├── .dockerignore ├── .gitattributes ├── .github └── workflows │ ├── build-citydb-tool.yml │ ├── cleanup-dev-images.yml │ ├── docker-build-push-dev.yml │ ├── docker-build-push-edge.yml │ └── docker-build-push-release.yml ├── .gitignore ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── build.gradle ├── citydb-cli ├── build.gradle └── src │ └── main │ ├── java │ ├── module-info.java │ └── org │ │ └── citydb │ │ └── cli │ │ ├── CliConstants.java │ │ ├── ExecutionException.java │ │ ├── Launcher.java │ │ ├── common │ │ ├── AppearanceOptions.java │ │ ├── Command.java │ │ ├── ConfigOption.java │ │ ├── ConnectionOptions.java │ │ ├── CountLimitOptions.java │ │ ├── CrsOptions.java │ │ ├── FilterOptions.java │ │ ├── IndexOptions.java │ │ ├── InputFileOptions.java │ │ ├── Option.java │ │ ├── OutputFileOptions.java │ │ ├── ThreadsOptions.java │ │ ├── TransformOptions.java │ │ ├── TypeNameOptions.java │ │ ├── UpgradeOptions.java │ │ └── ValidityOptions.java │ │ ├── deleter │ │ ├── DeleteCommand.java │ │ ├── DeleteLogger.java │ │ ├── DeleteOptions.java │ │ └── options │ │ │ ├── MetadataOptions.java │ │ │ └── QueryOptions.java │ │ ├── exporter │ │ ├── ExportCommand.java │ │ ├── ExportController.java │ │ ├── ExportOptions.java │ │ ├── citygml │ │ │ └── CityGMLExportCommand.java │ │ ├── cityjson │ │ │ ├── CityJSONExportCommand.java │ │ │ └── UpgradeOptions.java │ │ ├── options │ │ │ ├── LodOptions.java │ │ │ ├── QueryOptions.java │ │ │ ├── SortingOptions.java │ │ │ └── TilingOptions.java │ │ └── util │ │ │ ├── SequentialWriter.java │ │ │ └── TilingHelper.java │ │ ├── extension │ │ ├── ExportFormatCommand.java │ │ ├── ImportFormatCommand.java │ │ └── MainCommand.java │ │ ├── importer │ │ ├── ImportCommand.java │ │ ├── ImportController.java │ │ ├── ImportLogger.java │ │ ├── ImportMode.java │ │ ├── ImportOptions.java │ │ ├── citygml │ │ │ └── CityGMLImportCommand.java │ │ ├── cityjson │ │ │ └── CityJSONImportCommand.java │ │ ├── duplicate │ │ │ ├── DuplicateController.java │ │ │ ├── DuplicateDeleter.java │ │ │ └── DuplicateFinder.java │ │ ├── filter │ │ │ ├── BboxPredicate.java │ │ │ ├── FeatureTypeFilterPredicate.java │ │ │ └── Filter.java │ │ └── options │ │ │ ├── BboxOptions.java │ │ │ ├── CountLimitOptions.java │ │ │ ├── FilterOptions.java │ │ │ ├── IdOptions.java │ │ │ └── MetadataOptions.java │ │ ├── index │ │ ├── CreateIndexCommand.java │ │ ├── DropIndexCommand.java │ │ ├── IndexCommand.java │ │ ├── IndexController.java │ │ └── IndexStatusCommand.java │ │ └── util │ │ ├── CommandHelper.java │ │ ├── FeatureStatistics.java │ │ └── PidFile.java │ └── resources │ └── org │ └── citydb │ └── cli │ └── application.properties ├── citydb-config ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── config │ ├── Config.java │ ├── ConfigException.java │ ├── ConfigManager.java │ ├── SerializableConfig.java │ ├── common │ ├── ConfigObject.java │ ├── CountLimit.java │ └── SrsReference.java │ └── encoding │ ├── DateTimeReader.java │ └── ValidityTimeReader.java ├── citydb-core ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── core │ ├── CoreConstants.java │ ├── cache │ └── PersistentMapStore.java │ ├── concurrent │ ├── CountLatch.java │ ├── ExecutorHelper.java │ ├── LazyCheckedInitializer.java │ └── LazyInitializer.java │ ├── file │ ├── FileLocator.java │ ├── FileType.java │ ├── InputFile.java │ ├── OutputFile.java │ ├── helper │ │ ├── ParallelZipCreator.java │ │ ├── Pipe.java │ │ └── ScatterZipOutputStream.java │ ├── input │ │ ├── GZipInputFile.java │ │ ├── RegularInputFile.java │ │ └── ZipInputFile.java │ └── output │ │ ├── GZipOutputFile.java │ │ ├── RegularOutputFile.java │ │ └── ZipOutputFile.java │ ├── function │ ├── CheckedBiFunction.java │ ├── CheckedFunction.java │ └── CheckedSupplier.java │ ├── time │ └── TimeHelper.java │ ├── tuple │ ├── Pair.java │ ├── Quad.java │ ├── SimplePair.java │ ├── SimpleQuad.java │ ├── SimpleTriple.java │ └── Triple.java │ └── version │ ├── Version.java │ ├── VersionPolicy.java │ └── VersionSupport.java ├── citydb-database-postgres ├── build.gradle └── src │ └── main │ ├── java │ ├── module-info.java │ └── org │ │ └── citydb │ │ └── database │ │ └── postgres │ │ ├── BoxParser.java │ │ ├── GeometryAdapter.java │ │ ├── OperationHelper.java │ │ ├── PostgresqlAdapter.java │ │ ├── SchemaAdapter.java │ │ ├── SpatialOperationHelper.java │ │ └── TempTableHelper.java │ └── resources │ └── org │ └── citydb │ └── database │ └── postgres │ ├── query_feature_hierarchy.sql │ └── query_recursive_implicit_geometry.sql ├── citydb-database ├── build.gradle └── src │ ├── main │ ├── java │ │ ├── module-info.java │ │ └── org │ │ │ └── citydb │ │ │ └── database │ │ │ ├── DatabaseConstants.java │ │ │ ├── DatabaseException.java │ │ │ ├── DatabaseManager.java │ │ │ ├── DatabaseOptions.java │ │ │ ├── Pool.java │ │ │ ├── adapter │ │ │ ├── DatabaseAdapter.java │ │ │ ├── DatabaseAdapterException.java │ │ │ ├── DatabaseAdapterManager.java │ │ │ ├── DatabaseType.java │ │ │ ├── GeometryAdapter.java │ │ │ └── SchemaAdapter.java │ │ │ ├── connection │ │ │ ├── ConnectionDetails.java │ │ │ └── PoolOptions.java │ │ │ ├── geometry │ │ │ ├── GeometryBuilder.java │ │ │ ├── GeometryException.java │ │ │ ├── Properties.java │ │ │ ├── PropertiesBuilder.java │ │ │ ├── WKBConstants.java │ │ │ ├── WKBParser.java │ │ │ ├── WKBWriter.java │ │ │ ├── WKTConstants.java │ │ │ ├── WKTParser.java │ │ │ └── WKTWriter.java │ │ │ ├── metadata │ │ │ └── DatabaseMetadata.java │ │ │ ├── schema │ │ │ ├── Column.java │ │ │ ├── ColumnType.java │ │ │ ├── CommitOrder.java │ │ │ ├── Condition.java │ │ │ ├── DataType.java │ │ │ ├── FeatureType.java │ │ │ ├── GenericAttribute.java │ │ │ ├── GeometryObject.java │ │ │ ├── GeometryType.java │ │ │ ├── Index.java │ │ │ ├── Join.java │ │ │ ├── JoinTable.java │ │ │ ├── Joinable.java │ │ │ ├── Namespace.java │ │ │ ├── Property.java │ │ │ ├── SchemaException.java │ │ │ ├── SchemaMapping.java │ │ │ ├── SchemaMappingBuilder.java │ │ │ ├── SchemaObject.java │ │ │ ├── Sequence.java │ │ │ ├── SimpleType.java │ │ │ ├── Table.java │ │ │ ├── Type.java │ │ │ ├── Typeable.java │ │ │ ├── ValidityReference.java │ │ │ ├── Value.java │ │ │ └── ValueObject.java │ │ │ ├── srs │ │ │ ├── SpatialReference.java │ │ │ ├── SpatialReferenceType.java │ │ │ ├── SrsException.java │ │ │ └── SrsUnit.java │ │ │ └── util │ │ │ ├── IndexHelper.java │ │ │ ├── OperationHelper.java │ │ │ ├── SpatialOperationHelper.java │ │ │ ├── SqlHelper.java │ │ │ ├── SrsHelper.java │ │ │ ├── TempTable.java │ │ │ └── TempTableHelper.java │ └── resources │ │ └── org │ │ └── citydb │ │ └── database │ │ └── database.properties │ └── test │ └── java │ └── org │ └── citydb │ └── database │ └── geometry │ └── TestParserAndWriter.java ├── citydb-io-citygml ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── io │ └── citygml │ ├── CityGMLAdapter.java │ ├── CityGMLAdapterContext.java │ ├── CityJSONAdapter.java │ ├── adapter │ ├── address │ │ ├── AddressAdapter.java │ │ ├── AddressBuilder.java │ │ ├── AddressPropertyAdapter.java │ │ └── AddressSerializer.java │ ├── appearance │ │ ├── GeoreferencedTextureAdapter.java │ │ ├── ParameterizedTextureAdapter.java │ │ ├── SurfaceDataAdapter.java │ │ ├── TextureAdapter.java │ │ ├── X3DMaterialAdapter.java │ │ ├── builder │ │ │ ├── AppearanceBuilder.java │ │ │ └── AppearanceHelper.java │ │ └── serializer │ │ │ ├── AppearanceHelper.java │ │ │ └── AppearanceSerializer.java │ ├── bridge │ │ ├── AbstractBridgeAdapter.java │ │ ├── BridgeAdapter.java │ │ ├── BridgeConstructiveElementAdapter.java │ │ ├── BridgeConstructiveElementPropertyAdapter.java │ │ ├── BridgeFurnitureAdapter.java │ │ ├── BridgeFurniturePropertyAdapter.java │ │ ├── BridgeInstallationAdapter.java │ │ ├── BridgeInstallationPropertyAdapter.java │ │ ├── BridgePartAdapter.java │ │ ├── BridgePartPropertyAdapter.java │ │ ├── BridgeRoomAdapter.java │ │ └── BridgeRoomPropertyAdapter.java │ ├── building │ │ ├── AbstractBuildingAdapter.java │ │ ├── AbstractBuildingSubdivisionAdapter.java │ │ ├── AbstractBuildingSubdivisionPropertyAdapter.java │ │ ├── BuildingAdapter.java │ │ ├── BuildingConstructiveElementAdapter.java │ │ ├── BuildingConstructiveElementPropertyAdapter.java │ │ ├── BuildingFurnitureAdapter.java │ │ ├── BuildingFurniturePropertyAdapter.java │ │ ├── BuildingInstallationAdapter.java │ │ ├── BuildingInstallationPropertyAdapter.java │ │ ├── BuildingPartAdapter.java │ │ ├── BuildingPartPropertyAdapter.java │ │ ├── BuildingRoomAdapter.java │ │ ├── BuildingRoomPropertyAdapter.java │ │ ├── BuildingUnitAdapter.java │ │ ├── BuildingUnitPropertyAdapter.java │ │ ├── RoomHeightAdapter.java │ │ ├── StoreyAdapter.java │ │ └── StoreyPropertyAdapter.java │ ├── cityfurniture │ │ └── CityFurnitureAdapter.java │ ├── cityobjectgroup │ │ ├── CityObjectGroupAdapter.java │ │ └── RoleAdapter.java │ ├── construction │ │ ├── AbstractConstructionAdapter.java │ │ ├── AbstractConstructionSurfaceAdapter.java │ │ ├── AbstractConstructiveElementAdapter.java │ │ ├── AbstractFillingElementAdapter.java │ │ ├── AbstractFillingElementPropertyAdapter.java │ │ ├── AbstractFillingSurfaceAdapter.java │ │ ├── AbstractFillingSurfacePropertyAdapter.java │ │ ├── AbstractFurnitureAdapter.java │ │ ├── AbstractInstallationAdapter.java │ │ ├── CeilingSurfaceAdapter.java │ │ ├── ConstructionEventAdapter.java │ │ ├── DoorAdapter.java │ │ ├── DoorSurfaceAdapter.java │ │ ├── ElevationAdapter.java │ │ ├── FloorSurfaceAdapter.java │ │ ├── GroundSurfaceAdapter.java │ │ ├── HeightAdapter.java │ │ ├── InteriorWallSurfaceAdapter.java │ │ ├── OtherConstructionAdapter.java │ │ ├── OuterCeilingSurfaceAdapter.java │ │ ├── OuterFloorSurfaceAdapter.java │ │ ├── RoofSurfaceAdapter.java │ │ ├── WallSurfaceAdapter.java │ │ ├── WindowAdapter.java │ │ └── WindowSurfaceAdapter.java │ ├── core │ │ ├── AbstractAppearancePropertyAdapter.java │ │ ├── AbstractCityObjectAdapter.java │ │ ├── AbstractCityObjectReferenceAdapter.java │ │ ├── AbstractDynamizerPropertyAdapter.java │ │ ├── AbstractFeatureAdapter.java │ │ ├── AbstractFeatureWithLifespanAdapter.java │ │ ├── AbstractGenericAttributeAdapter.java │ │ ├── AbstractLogicalSpaceAdapter.java │ │ ├── AbstractOccupiedSpaceAdapter.java │ │ ├── AbstractPhysicalSpaceAdapter.java │ │ ├── AbstractPointCloudPropertyAdapter.java │ │ ├── AbstractSpaceAdapter.java │ │ ├── AbstractSpaceBoundaryAdapter.java │ │ ├── AbstractSpaceBoundaryPropertyAdapter.java │ │ ├── AbstractThematicSurfaceAdapter.java │ │ ├── AbstractUnoccupiedSpaceAdapter.java │ │ ├── CityObjectRelationAdapter.java │ │ ├── ClosureSurfaceAdapter.java │ │ ├── ExternalReferenceAdapter.java │ │ ├── ImplicitGeometryAdapter.java │ │ ├── ImplicitGeometryPropertyAdapter.java │ │ ├── OccupancyAdapter.java │ │ ├── QualifiedAreaAdapter.java │ │ ├── QualifiedVolumeAdapter.java │ │ ├── SpaceBoundaryGeometrySupport.java │ │ └── SpaceGeometrySupport.java │ ├── dynamizer │ │ ├── AbstractAtomicTimeseriesAdapter.java │ │ ├── AbstractTimeseriesAdapter.java │ │ ├── AbstractTimeseriesPropertyAdapter.java │ │ ├── CompositeTimeseriesAdapter.java │ │ ├── DynamizerAdapter.java │ │ ├── GenericTimeseriesAdapter.java │ │ ├── SensorConnectionAdapter.java │ │ ├── StandardFileTimeseriesAdapter.java │ │ ├── TabulatedFileTimeseriesAdapter.java │ │ ├── TimeValuePairAdapter.java │ │ └── TimeseriesComponentAdapter.java │ ├── generics │ │ ├── CodeAttributeAdapter.java │ │ ├── DateAttributeAdapter.java │ │ ├── DoubleAttributeAdapter.java │ │ ├── GenericAttributeSetAdapter.java │ │ ├── GenericLogicalSpaceAdapter.java │ │ ├── GenericOccupiedSpaceAdapter.java │ │ ├── GenericThematicSurfaceAdapter.java │ │ ├── GenericUnoccupiedSpaceAdapter.java │ │ ├── IntAttributeAdapter.java │ │ ├── MeasureAttributeAdapter.java │ │ ├── StringAttributeAdapter.java │ │ └── UriAttributeAdapter.java │ ├── geometry │ │ ├── builder │ │ │ ├── CurveGeometryBuilder.java │ │ │ ├── GeometryBuilder.java │ │ │ ├── GeometryHelper.java │ │ │ ├── Lod.java │ │ │ ├── PointGeometryBuilder.java │ │ │ ├── SolidGeometryBuilder.java │ │ │ └── SurfaceGeometryBuilder.java │ │ └── serializer │ │ │ ├── AbstractGeometryPropertyAdapter.java │ │ │ ├── CurvePropertyAdapter.java │ │ │ ├── ExtentPropertyAdapter.java │ │ │ ├── GeometricComplexPropertyAdapter.java │ │ │ ├── GeometricPrimitivePropertyAdapter.java │ │ │ ├── GeometryHelper.java │ │ │ ├── GeometryPropertyAdapter.java │ │ │ ├── MultiCurvePropertyAdapter.java │ │ │ ├── MultiPointPropertyAdapter.java │ │ │ ├── MultiSolidPropertyAdapter.java │ │ │ ├── MultiSurfacePropertyAdapter.java │ │ │ ├── PointPropertyAdapter.java │ │ │ ├── SolidPropertyAdapter.java │ │ │ ├── SurfacePropertyAdapter.java │ │ │ └── TinPropertyAdapter.java │ ├── gml │ │ ├── AbstractGMLAdapter.java │ │ ├── AbstractInlineOrByReferencePropertyAdapter.java │ │ ├── AbstractMeasureAdapter.java │ │ ├── AbstractReferenceAdapter.java │ │ ├── AreaAdapter.java │ │ ├── CodeAdapter.java │ │ ├── LengthAdapter.java │ │ ├── MeasureAdapter.java │ │ ├── MeasureOrNilReasonListAdapter.java │ │ ├── ReferenceAttributeAdapter.java │ │ ├── StringOrRefAdapter.java │ │ ├── TimeDurationAdapter.java │ │ ├── TimePositionAdapter.java │ │ └── VolumeAdapter.java │ ├── landuse │ │ └── LandUseAdapter.java │ ├── relief │ │ ├── AbstractReliefComponentAdapter.java │ │ ├── AbstractReliefComponentPropertyAdapter.java │ │ ├── BreaklineReliefAdapter.java │ │ ├── MassPointReliefAdapter.java │ │ ├── ReliefFeatureAdapter.java │ │ └── TINReliefAdapter.java │ ├── transportation │ │ ├── AbstractTransportationSpaceAdapter.java │ │ ├── AuxiliaryTrafficAreaAdapter.java │ │ ├── AuxiliaryTrafficSpaceAdapter.java │ │ ├── AuxiliaryTrafficSpacePropertyAdapter.java │ │ ├── ClearanceSpaceAdapter.java │ │ ├── ClearanceSpacePropertyAdapter.java │ │ ├── HoleAdapter.java │ │ ├── HolePropertyAdapter.java │ │ ├── HoleSurfaceAdapter.java │ │ ├── IntersectionAdapter.java │ │ ├── IntersectionPropertyAdapter.java │ │ ├── MarkingAdapter.java │ │ ├── MarkingPropertyAdapter.java │ │ ├── RailwayAdapter.java │ │ ├── RoadAdapter.java │ │ ├── SectionAdapter.java │ │ ├── SectionPropertyAdapter.java │ │ ├── SquareAdapter.java │ │ ├── TrackAdapter.java │ │ ├── TrafficAreaAdapter.java │ │ ├── TrafficSpaceAdapter.java │ │ ├── TrafficSpacePropertyAdapter.java │ │ ├── TrafficSpaceReferenceAdapter.java │ │ └── WaterwayAdapter.java │ ├── tunnel │ │ ├── AbstractTunnelAdapter.java │ │ ├── HollowSpaceAdapter.java │ │ ├── HollowSpacePropertyAdapter.java │ │ ├── TunnelAdapter.java │ │ ├── TunnelConstructiveElementAdapter.java │ │ ├── TunnelConstructiveElementPropertyAdapter.java │ │ ├── TunnelFurnitureAdapter.java │ │ ├── TunnelFurniturePropertyAdapter.java │ │ ├── TunnelInstallationAdapter.java │ │ ├── TunnelInstallationPropertyAdapter.java │ │ ├── TunnelPartAdapter.java │ │ └── TunnelPartPropertyAdapter.java │ ├── vegetation │ │ ├── AbstractVegetationObjectAdapter.java │ │ ├── PlantCoverAdapter.java │ │ └── SolitaryVegetationObjectAdapter.java │ └── waterbody │ │ ├── AbstractWaterBoundarySurfaceAdapter.java │ │ ├── WaterBodyAdapter.java │ │ ├── WaterGroundSurfaceAdapter.java │ │ └── WaterSurfaceAdapter.java │ ├── annotation │ ├── DatabaseType.java │ └── DatabaseTypes.java │ ├── builder │ ├── ModelBuildException.java │ └── ModelBuilder.java │ ├── reader │ ├── CityGMLFormatOptions.java │ ├── CityGMLReader.java │ ├── CityGMLReaderFactory.java │ ├── CityJSONFormatOptions.java │ ├── CityJSONReader.java │ ├── CityJSONReaderFactory.java │ ├── ModelBuilderHelper.java │ ├── options │ │ ├── AppearanceOptions.java │ │ └── FormatOptions.java │ ├── preprocess │ │ ├── AppearanceHelper.java │ │ ├── AppearanceRemover.java │ │ ├── CityObjectGroupRemover.java │ │ ├── CrossLodReferenceResolver.java │ │ ├── DeprecatedPropertiesProcessor.java │ │ ├── GeometryCopyBuilder.java │ │ ├── GeometryReferenceResolver.java │ │ ├── GlobalAppearanceConverter.java │ │ ├── ImplicitGeometryResolver.java │ │ ├── LodFilter.java │ │ └── Preprocessor.java │ └── util │ │ ├── CityGMLVersionHelper.java │ │ ├── FeatureHelper.java │ │ ├── FileMetadata.java │ │ └── IdCreator.java │ ├── serializer │ ├── ModelSerializeException.java │ └── ModelSerializer.java │ └── writer │ ├── CityGMLChunkWriter.java │ ├── CityGMLFormatOptions.java │ ├── CityGMLWriter.java │ ├── CityGMLWriterFactory.java │ ├── CityJSONFormatOptions.java │ ├── CityJSONWriter.java │ ├── CityJSONWriterFactory.java │ ├── ModelSerializerHelper.java │ ├── options │ └── AddressMode.java │ ├── preprocess │ └── Preprocessor.java │ └── util │ ├── CityGMLVersionHelper.java │ └── GlobalFeatureWriter.java ├── citydb-io ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── io │ ├── FileFormat.java │ ├── IOAdapter.java │ ├── IOAdapterException.java │ ├── IOAdapterManager.java │ ├── InputFiles.java │ ├── OutputFileBuilder.java │ ├── reader │ ├── FeatureReader.java │ ├── ReadException.java │ ├── ReadOptions.java │ ├── filter │ │ ├── Filter.java │ │ ├── FilterException.java │ │ └── FilterPredicate.java │ └── options │ │ ├── BboxMode.java │ │ ├── FilterOptions.java │ │ └── InputFormatOptions.java │ ├── util │ └── MediaTypes.java │ ├── validator │ ├── ValidateException.java │ └── Validator.java │ └── writer │ ├── FeatureWriter.java │ ├── WriteException.java │ ├── WriteOptions.java │ └── options │ └── OutputFormatOptions.java ├── citydb-logging ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── logging │ ├── LogConsole.java │ ├── LogConstants.java │ ├── LogFile.java │ └── LoggerManager.java ├── citydb-model ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── model │ ├── address │ ├── Address.java │ └── AddressDescriptor.java │ ├── appearance │ ├── Appearance.java │ ├── AppearanceDescriptor.java │ ├── Color.java │ ├── GeoreferencedTexture.java │ ├── ParameterizedTexture.java │ ├── SurfaceData.java │ ├── SurfaceDataProperty.java │ ├── Texture.java │ ├── TextureCoordinate.java │ ├── TextureImageProperty.java │ ├── TextureType.java │ ├── WrapMode.java │ └── X3DMaterial.java │ ├── common │ ├── Child.java │ ├── ChildList.java │ ├── DatabaseDescriptor.java │ ├── Describable.java │ ├── ExternalFile.java │ ├── Identifiable.java │ ├── InlineOrByReferenceProperty.java │ ├── InlineProperty.java │ ├── Matrix2x2.java │ ├── Matrix3x4.java │ ├── Matrix4x4.java │ ├── Name.java │ ├── Namespaces.java │ ├── PrefixedName.java │ ├── PropertyMap.java │ ├── Referencable.java │ ├── Reference.java │ ├── RelationType.java │ ├── UserProperties.java │ ├── Visitable.java │ └── Visitor.java │ ├── encoding │ ├── EnvelopeReader.java │ ├── EnvelopeWriter.java │ ├── Matrix3x4Reader.java │ ├── Matrix3x4Writer.java │ ├── ModelObjectReader.java │ ├── ModelObjectWriter.java │ ├── PointReader.java │ ├── PointWriter.java │ ├── PrefixedNamesReader.java │ └── PrefixedNamesWriter.java │ ├── feature │ ├── Feature.java │ ├── FeatureCollection.java │ ├── FeatureDescriptor.java │ ├── FeatureType.java │ └── FeatureTypeProvider.java │ ├── geometry │ ├── CompositeSolid.java │ ├── CompositeSurface.java │ ├── Coordinate.java │ ├── Envelope.java │ ├── Geometry.java │ ├── GeometryDescriptor.java │ ├── GeometryType.java │ ├── ImplicitGeometry.java │ ├── LineString.java │ ├── LinearRing.java │ ├── MultiLineString.java │ ├── MultiPoint.java │ ├── MultiSolid.java │ ├── MultiSurface.java │ ├── Point.java │ ├── Polygon.java │ ├── Solid.java │ ├── SolidCollection.java │ ├── SpatialObject.java │ ├── SrsReference.java │ ├── Surface.java │ ├── SurfaceCollection.java │ └── TriangulatedSurface.java │ ├── property │ ├── AddressProperty.java │ ├── AppearanceProperty.java │ ├── ArrayValue.java │ ├── Attribute.java │ ├── DataType.java │ ├── DataTypeProvider.java │ ├── FeatureProperty.java │ ├── GeometryProperty.java │ ├── ImplicitGeometryProperty.java │ ├── Property.java │ ├── PropertyDescriptor.java │ └── Value.java │ ├── util │ ├── AffineTransformer.java │ ├── GeometryInfo.java │ ├── IdCreator.java │ └── matrix │ │ ├── LUDecomposition.java │ │ ├── Matrix.java │ │ └── QRDecomposition.java │ └── walker │ └── ModelWalker.java ├── citydb-operation ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── operation │ ├── deleter │ ├── DeleteException.java │ ├── DeleteHelper.java │ ├── DeleteOptions.java │ ├── Deleter.java │ ├── common │ │ └── DatabaseDeleter.java │ ├── feature │ │ └── FeatureDeleter.java │ ├── options │ │ └── DeleteMode.java │ └── util │ │ ├── DeleteLogEntry.java │ │ ├── DeleteLogger.java │ │ └── TableHelper.java │ ├── exporter │ ├── ExportConstants.java │ ├── ExportException.java │ ├── ExportHelper.java │ ├── ExportOptions.java │ ├── Exporter.java │ ├── address │ │ └── AddressExporter.java │ ├── appearance │ │ ├── AppearanceExporter.java │ │ ├── GeoreferencedTextureExporter.java │ │ ├── ParameterizedTextureExporter.java │ │ ├── SurfaceDataExporter.java │ │ ├── SurfaceDataMappingExporter.java │ │ ├── TextureExporter.java │ │ └── X3DMaterialExporter.java │ ├── common │ │ ├── BlobExporter.java │ │ └── DatabaseExporter.java │ ├── feature │ │ ├── FeatureExporter.java │ │ └── FeatureHierarchyExporter.java │ ├── geometry │ │ ├── GeometryExporter.java │ │ └── ImplicitGeometryExporter.java │ ├── hierarchy │ │ ├── Hierarchy.java │ │ ├── HierarchyBuilder.java │ │ └── PropertyBuilder.java │ ├── options │ │ ├── AppearanceOptions.java │ │ ├── LodMode.java │ │ ├── LodOptions.java │ │ ├── ValidityMode.java │ │ └── ValidityOptions.java │ ├── property │ │ ├── PropertyExporter.java │ │ └── PropertyStub.java │ └── util │ │ ├── AppearanceHelper.java │ │ ├── EnvelopeHelper.java │ │ ├── ExternalFileHelper.java │ │ ├── LodFilter.java │ │ ├── Postprocessor.java │ │ ├── SurfaceDataMapper.java │ │ ├── TableHelper.java │ │ └── ValidityFilter.java │ └── importer │ ├── ImportException.java │ ├── ImportHelper.java │ ├── ImportOptions.java │ ├── Importer.java │ ├── address │ └── AddressImporter.java │ ├── appearance │ ├── AppearanceImporter.java │ ├── GeoreferencedTextureImporter.java │ ├── ParameterizedTextureImporter.java │ ├── SurfaceDataImporter.java │ ├── SurfaceDataMappingImporter.java │ ├── SurfaceDataPropertyImporter.java │ ├── TextureImageImporter.java │ ├── TextureImporter.java │ └── X3DMaterialImporter.java │ ├── common │ └── DatabaseImporter.java │ ├── feature │ └── FeatureImporter.java │ ├── geometry │ ├── GeometryImporter.java │ └── ImplicitGeometryImporter.java │ ├── property │ ├── AddressPropertyImporter.java │ ├── AppearancePropertyImporter.java │ ├── AttributeImporter.java │ ├── FeaturePropertyImporter.java │ ├── GeometryPropertyImporter.java │ ├── ImplicitGeometryPropertyImporter.java │ └── PropertyImporter.java │ ├── reference │ ├── CacheType.java │ ├── ReferenceCache.java │ └── ReferenceManager.java │ └── util │ ├── ImportLogEntry.java │ ├── ImportLogger.java │ ├── SequenceHelper.java │ ├── SequenceValues.java │ ├── SurfaceDataMapper.java │ ├── SurfaceDataMapping.java │ └── TableHelper.java ├── citydb-plugin ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── plugin │ ├── Extension.java │ ├── Plugin.java │ ├── PluginException.java │ ├── PluginManager.java │ └── metadata │ ├── PluginMetadata.java │ └── PluginVendor.java ├── citydb-query ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── query │ ├── Query.java │ ├── QueryHelper.java │ ├── builder │ ├── QueryBuildException.java │ ├── common │ │ ├── Type.java │ │ └── TypeCast.java │ ├── schema │ │ ├── Node.java │ │ ├── SchemaPathBuilder.java │ │ └── SchemaPathException.java │ └── sql │ │ ├── ArithmeticExpressionBuilder.java │ │ ├── BuildResult.java │ │ ├── BuilderHelper.java │ │ ├── ComparisonPredicateBuilder.java │ │ ├── CountLimitBuilder.java │ │ ├── FeatureTypesBuilder.java │ │ ├── FilterBuilder.java │ │ ├── FunctionBuilder.java │ │ ├── LodFilterBuilder.java │ │ ├── LogicalPredicateBuilder.java │ │ ├── SortingBuilder.java │ │ ├── SpatialPredicateBuilder.java │ │ ├── SqlBuildOptions.java │ │ ├── SqlContext.java │ │ ├── SqlContextBuilder.java │ │ ├── SqlExpressionBuilder.java │ │ └── SqlQueryBuilder.java │ ├── executor │ ├── QueryExecutor.java │ ├── QueryResult.java │ └── SqlFunction.java │ ├── filter │ ├── Filter.java │ ├── common │ │ ├── Argument.java │ │ ├── CharacterExpression.java │ │ ├── ComparisonPredicate.java │ │ ├── Distance.java │ │ ├── Expression.java │ │ ├── FilterVisitor.java │ │ ├── FilterWalker.java │ │ ├── GeometryExpression.java │ │ ├── LogicalPredicate.java │ │ ├── PatternExpression.java │ │ ├── Predicate.java │ │ ├── ScalarExpression.java │ │ ├── Sign.java │ │ └── SpatialPredicate.java │ ├── encoding │ │ ├── FilterConfigReader.java │ │ ├── FilterConfigWriter.java │ │ ├── FilterJSONParser.java │ │ ├── FilterJSONWriter.java │ │ ├── FilterParseException.java │ │ ├── FilterTextBuilder.java │ │ ├── FilterTextParser.java │ │ ├── FilterTextWriter.java │ │ ├── GeoJSONParser.java │ │ ├── GeoJSONWriter.java │ │ ├── JSONToken.java │ │ ├── Node.java │ │ ├── NodeType.java │ │ ├── Precedence.java │ │ ├── TextToken.java │ │ ├── Token.java │ │ └── Tokenizer.java │ ├── function │ │ ├── Function.java │ │ └── FunctionName.java │ ├── literal │ │ ├── BBoxLiteral.java │ │ ├── BooleanLiteral.java │ │ ├── DateLiteral.java │ │ ├── GeometryLiteral.java │ │ ├── Literal.java │ │ ├── NumericLiteral.java │ │ ├── PropertyRef.java │ │ ├── StringLiteral.java │ │ └── TimestampLiteral.java │ └── operation │ │ ├── ArithmeticExpression.java │ │ ├── ArithmeticOperator.java │ │ ├── Between.java │ │ ├── BinaryBooleanPredicate.java │ │ ├── BinaryComparisonPredicate.java │ │ ├── BinarySpatialPredicate.java │ │ ├── BooleanExpression.java │ │ ├── BooleanOperator.java │ │ ├── ComparisonOperator.java │ │ ├── DWithin.java │ │ ├── In.java │ │ ├── IsNull.java │ │ ├── Like.java │ │ ├── Not.java │ │ ├── NumericExpression.java │ │ ├── Operators.java │ │ ├── SpatialOperator.java │ │ └── SqlExpression.java │ ├── lod │ ├── LodFilter.java │ └── LodFilterMode.java │ └── sorting │ ├── PropertyConfigReader.java │ ├── PropertyConfigWriter.java │ ├── SortBy.java │ ├── SortOrder.java │ └── Sorting.java ├── citydb-util ├── build.gradle └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── citydb │ └── util │ ├── csv │ ├── IdList.java │ ├── IdListException.java │ ├── IdListOptions.java │ └── IdListPreviewer.java │ └── tiling │ ├── Tile.java │ ├── TileIterator.java │ ├── TileMatrix.java │ ├── Tiling.java │ ├── TilingException.java │ ├── TilingScheme.java │ └── options │ ├── Dimension.java │ ├── DimensionScheme.java │ ├── MatrixScheme.java │ └── TileMatrixOrigin.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── properties.gradle ├── resources ├── javadoc │ └── overview.html ├── license │ ├── APACHE-2.0.txt │ └── LICENSE.txt └── samples │ └── datasets │ └── railway_scene_lod3_v2.zip └── settings.gradle /.dockerignore: -------------------------------------------------------------------------------- 1 | # Git and GitHub 2 | .github/ 3 | .git/ 4 | .gitignore 5 | .gitattributes 6 | 7 | # Gradle 8 | .gradle/ 9 | **/build/ 10 | 11 | # Docker 12 | .dockerignore 13 | Dockerfile* 14 | 15 | # Unused resources 16 | resources/javadoc 17 | resources/license 18 | resources/samples 19 | LICENSE 20 | *.md 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.bat text eol=crlf 2 | *.sh text eol=lf 3 | Dockerfile text eol=lf 4 | gradlew text eol=lf -------------------------------------------------------------------------------- /.github/workflows/build-citydb-tool.yml: -------------------------------------------------------------------------------- 1 | name: Build citydb-tool 2 | 3 | on: [ push, pull_request ] 4 | 5 | jobs: 6 | gradle: 7 | strategy: 8 | matrix: 9 | os: [ ubuntu-latest, windows-latest ] 10 | java: [ 21 ] 11 | distribution: [ temurin ] 12 | runs-on: ${{ matrix.os }} 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v4 16 | - name: Setup Java 17 | uses: actions/setup-java@v4 18 | with: 19 | distribution: ${{ matrix.distribution }} 20 | java-version: ${{ matrix.java }} 21 | - name: Grant execute permission to Gradle 22 | run: chmod +x ./gradlew 23 | - name: Setup Gradle 24 | uses: gradle/actions/setup-gradle@v4 25 | with: 26 | cache-disabled: true 27 | - name: Execute Gradle build 28 | run: ./gradlew build 29 | -------------------------------------------------------------------------------- /.github/workflows/cleanup-dev-images.yml: -------------------------------------------------------------------------------- 1 | name: Cleanup PR images 2 | on: 3 | pull_request: 4 | types: [closed] 5 | workflow_dispatch: 6 | inputs: 7 | pr-number: 8 | description: "Pull Request Number" 9 | required: true 10 | default: "0" 11 | 12 | env: 13 | PACKAGE_NAME: citydb-tool-dev 14 | 15 | jobs: 16 | ghcr-cleanup-image: 17 | if: github.event_name == 'pull_request' 18 | name: ghcr cleanup action 19 | runs-on: ubuntu-latest 20 | steps: 21 | - name: Delete image 22 | uses: dataaxiom/ghcr-cleanup-action@v1 23 | with: 24 | delete-tags: "*pr-${{github.event.pull_request.number}}*" 25 | package: ${{ env.PACKAGE_NAME }} 26 | 27 | ghcr-cleanup-image-manual: 28 | if: github.event_name == 'workflow_dispatch' 29 | name: ghcr cleanup action 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Delete image 33 | uses: dataaxiom/ghcr-cleanup-action@v1 34 | with: 35 | delete-tags: "*pr-${{ inputs.pr-number }}*" 36 | package: ${{ env.PACKAGE_NAME }} 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/ 2 | gradle.properties 3 | build/ 4 | 5 | # Eclipse 6 | .classpath 7 | .project 8 | .settings/ 9 | bin/ 10 | 11 | # Intellij 12 | .idea/ 13 | *.iml 14 | *.iws 15 | out/ -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [Unreleased] 4 | 5 | ## [1.0.0] - 2025-03-17 6 | 7 | This is the initial release of citydb-tool. 8 | 9 | [Unreleased]: https://github.com/3dcitydb/citydb-tool/compare/v1.0.0..HEAD 10 | [1.0.0]: https://github.com/3dcitydb/citydb-tool/releases/tag/v1.0.0 -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # citydb-tool Dockerfile ###################################################### 2 | # Official website https://www.3dcitydb.org 3 | # GitHub https://github.com/3dcitydb/citydb-tool 4 | ############################################################################### 5 | 6 | # Fetch & build stage ######################################################### 7 | # ARGS 8 | ARG BUILDER_IMAGE_TAG='21-jdk-noble' 9 | ARG RUNTIME_IMAGE_TAG='21-jre-noble' 10 | 11 | # Base image 12 | FROM eclipse-temurin:${BUILDER_IMAGE_TAG} AS builder 13 | 14 | # Copy source code 15 | WORKDIR /build 16 | COPY . /build 17 | 18 | # Build 19 | RUN set -x && \ 20 | chmod u+x ./gradlew && ./gradlew installDockerDist 21 | 22 | # Runtime stage ############################################################### 23 | # Base image 24 | FROM eclipse-temurin:${RUNTIME_IMAGE_TAG} AS runtime 25 | 26 | # Version info 27 | ARG CITYDB_TOOL_VERSION 28 | ENV CITYDB_TOOL_VERSION=${CITYDB_TOOL_VERSION} 29 | 30 | # Copy from builder 31 | COPY --from=builder /build/citydb-cli/build/install/citydb-tool-docker /opt/citydb-tool 32 | 33 | # Put start script in path 34 | RUN set -x && \ 35 | ln -sf /opt/citydb-tool/citydb /usr/local/bin 36 | 37 | USER 1000 38 | WORKDIR /data 39 | 40 | ENTRYPOINT ["citydb"] 41 | CMD ["--help"] 42 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/ExecutionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli; 23 | 24 | public class ExecutionException extends Exception { 25 | 26 | public ExecutionException() { 27 | } 28 | 29 | public ExecutionException(String message) { 30 | super(message); 31 | } 32 | 33 | public ExecutionException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ExecutionException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/common/ConfigOption.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.common; 23 | 24 | import java.lang.annotation.*; 25 | 26 | @Documented 27 | @Target(value = ElementType.FIELD) 28 | @Retention(value = RetentionPolicy.RUNTIME) 29 | public @interface ConfigOption { 30 | } 31 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/common/IndexOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.common; 23 | 24 | import picocli.CommandLine; 25 | 26 | public class IndexOptions implements Option { 27 | public enum Mode {keep, drop, drop_create} 28 | 29 | @CommandLine.Option(names = "--index-mode", defaultValue = "keep", 30 | description = "Index mode: ${COMPLETION-CANDIDATES} (default: ${DEFAULT-VALUE}). Consider dropping " + 31 | "indexes when processing large quantities of data.") 32 | protected Mode mode; 33 | 34 | public Mode getMode() { 35 | return mode; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/common/Option.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.common; 23 | 24 | import picocli.CommandLine; 25 | 26 | public interface Option { 27 | default void preprocess(CommandLine commandLine) throws Exception { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/common/OutputFileOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.common; 23 | 24 | import picocli.CommandLine; 25 | 26 | import java.nio.file.Path; 27 | 28 | public class OutputFileOptions implements Option { 29 | @CommandLine.Option(names = {"-o", "--output"}, required = true, 30 | description = "Name of the output file.") 31 | private Path file; 32 | 33 | @CommandLine.Option(names = "--output-encoding", 34 | description = "Encoding to use for the output file.") 35 | private String encoding; 36 | 37 | public Path getFile() { 38 | return file; 39 | } 40 | 41 | public String getEncoding() { 42 | return encoding; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/common/TypeNameOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.common; 23 | 24 | import org.citydb.model.common.PrefixedName; 25 | import picocli.CommandLine; 26 | 27 | import java.util.Arrays; 28 | import java.util.List; 29 | 30 | public class TypeNameOptions implements Option { 31 | @CommandLine.Option(names = {"-t", "--type-name"}, split = ",", paramLabel = "<[prefix:]name>", 32 | description = "Names of the features to process.") 33 | private String[] typeNames; 34 | 35 | public List getTypeNames() { 36 | return Arrays.stream(typeNames) 37 | .map(PrefixedName::of) 38 | .toList(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/exporter/cityjson/UpgradeOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.exporter.cityjson; 23 | 24 | import org.citydb.cli.common.Option; 25 | import picocli.CommandLine; 26 | 27 | public class UpgradeOptions implements Option { 28 | @CommandLine.Option(names = "--use-lod4-as-lod3", 29 | description = "Use LoD4 as LoD3, replacing an existing LoD3.") 30 | private Boolean useLod4AsLod3; 31 | 32 | public Boolean getUseLod4AsLod3() { 33 | return useLod4AsLod3; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/extension/ExportFormatCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.extension; 23 | 24 | import org.citydb.cli.exporter.ExportController; 25 | import org.citydb.plugin.Extension; 26 | 27 | public abstract class ExportFormatCommand extends ExportController implements Extension { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/extension/ImportFormatCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.extension; 23 | 24 | import org.citydb.cli.importer.ImportController; 25 | import org.citydb.plugin.Extension; 26 | 27 | public abstract class ImportFormatCommand extends ImportController implements Extension { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/extension/MainCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.extension; 23 | 24 | import org.citydb.cli.common.Command; 25 | import org.citydb.plugin.Extension; 26 | 27 | public interface MainCommand extends Extension, Command { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-cli/src/main/java/org/citydb/cli/importer/options/IdOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.cli.importer.options; 23 | 24 | import picocli.CommandLine; 25 | 26 | import java.util.Arrays; 27 | import java.util.HashSet; 28 | import java.util.Set; 29 | 30 | public class IdOptions { 31 | @CommandLine.Option(names = {"-i", "--id"}, split = ",", paramLabel = "", 32 | description = "Identifiers of the features to process.") 33 | private String[] ids; 34 | 35 | public Set getIds() { 36 | return new HashSet<>(Arrays.asList(ids)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /citydb-cli/src/main/resources/org/citydb/cli/application.properties: -------------------------------------------------------------------------------- 1 | name=@name@ 2 | version=@version@ 3 | copyrightYear=@copyrightYear@ 4 | vendor=@vendor@ -------------------------------------------------------------------------------- /citydb-config/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':citydb-core') 3 | } -------------------------------------------------------------------------------- /citydb-config/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.config { 2 | requires transitive org.citydb.core; 3 | requires transitive com.alibaba.fastjson2; 4 | 5 | exports org.citydb.config; 6 | exports org.citydb.config.common; 7 | exports org.citydb.config.encoding; 8 | } -------------------------------------------------------------------------------- /citydb-config/src/main/java/org/citydb/config/Config.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.config; 23 | 24 | import org.citydb.config.common.ConfigObject; 25 | 26 | public class Config extends ConfigObject { 27 | } 28 | -------------------------------------------------------------------------------- /citydb-config/src/main/java/org/citydb/config/ConfigException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.config; 23 | 24 | public class ConfigException extends Exception { 25 | 26 | public ConfigException() { 27 | } 28 | 29 | public ConfigException(String message) { 30 | super(message); 31 | } 32 | 33 | public ConfigException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ConfigException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-config/src/main/java/org/citydb/config/SerializableConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.config; 23 | 24 | import java.lang.annotation.*; 25 | 26 | @Documented 27 | @Target(value = ElementType.TYPE) 28 | @Retention(value = RetentionPolicy.RUNTIME) 29 | public @interface SerializableConfig { 30 | String name(); 31 | } 32 | -------------------------------------------------------------------------------- /citydb-core/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'com.alibaba.fastjson2:fastjson2:2.0.56' 3 | api 'org.apache.tika:tika-core:3.1.0' 4 | implementation 'org.apache.commons:commons-compress:1.27.1' 5 | implementation 'com.h2database:h2-mvstore:2.3.232' 6 | } -------------------------------------------------------------------------------- /citydb-core/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | @SuppressWarnings("requires-transitive-automatic") 2 | module org.citydb.core { 3 | requires org.apache.commons.compress; 4 | requires org.apache.commons.io; 5 | requires com.h2database.mvstore; 6 | requires transitive com.alibaba.fastjson2; 7 | requires transitive org.apache.tika.core; 8 | 9 | exports org.citydb.core; 10 | exports org.citydb.core.cache; 11 | exports org.citydb.core.concurrent; 12 | exports org.citydb.core.file; 13 | exports org.citydb.core.file.input; 14 | exports org.citydb.core.file.output; 15 | exports org.citydb.core.function; 16 | exports org.citydb.core.time; 17 | exports org.citydb.core.tuple; 18 | exports org.citydb.core.version; 19 | } -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/file/FileType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.file; 23 | 24 | public enum FileType { 25 | REGULAR, 26 | ARCHIVE 27 | } 28 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/file/input/GZipInputFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.file.input; 23 | 24 | import org.apache.tika.mime.MediaType; 25 | 26 | import java.io.BufferedInputStream; 27 | import java.io.IOException; 28 | import java.io.InputStream; 29 | import java.nio.file.Files; 30 | import java.nio.file.Path; 31 | import java.util.zip.GZIPInputStream; 32 | 33 | public class GZipInputFile extends RegularInputFile { 34 | 35 | public GZipInputFile(Path file, MediaType mediaType) { 36 | super(file, mediaType); 37 | } 38 | 39 | @Override 40 | public InputStream openStream() throws IOException { 41 | return new GZIPInputStream(new BufferedInputStream(Files.newInputStream(getFile()))); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/file/output/GZipOutputFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.file.output; 23 | 24 | import java.io.IOException; 25 | import java.io.OutputStream; 26 | import java.nio.file.Files; 27 | import java.nio.file.Path; 28 | import java.util.zip.GZIPOutputStream; 29 | 30 | public class GZipOutputFile extends RegularOutputFile { 31 | 32 | public GZipOutputFile(Path file) { 33 | super(file); 34 | } 35 | 36 | @Override 37 | public OutputStream openStream() throws IOException { 38 | return new GZIPOutputStream(Files.newOutputStream(getFile())); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/function/CheckedBiFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.function; 23 | 24 | import java.util.Objects; 25 | 26 | @FunctionalInterface 27 | public interface CheckedBiFunction { 28 | R apply(T t, U u) throws E; 29 | 30 | default CheckedBiFunction andThen(CheckedFunction after) { 31 | Objects.requireNonNull(after); 32 | return (t, u) -> after.apply(apply(t, u)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/function/CheckedFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.function; 23 | 24 | import java.util.Objects; 25 | 26 | @FunctionalInterface 27 | public interface CheckedFunction { 28 | R apply(T t) throws E; 29 | 30 | default CheckedFunction andThen(CheckedFunction after) { 31 | Objects.requireNonNull(after); 32 | return t -> after.apply(apply(t)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/function/CheckedSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.function; 23 | 24 | import java.util.Objects; 25 | 26 | @FunctionalInterface 27 | public interface CheckedSupplier { 28 | T get() throws E; 29 | 30 | default CheckedSupplier andThen(CheckedFunction after) { 31 | Objects.requireNonNull(after); 32 | return () -> after.apply(get()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/tuple/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.tuple; 23 | 24 | public record Pair(T first, U second) { 25 | public static Pair of(T first, U second) { 26 | return new Pair<>(first, second); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/tuple/Quad.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.tuple; 23 | 24 | public record Quad(T first, U second, V third, W fourth) { 25 | public static Quad of(T first, U second, V third, W fourth) { 26 | return new Quad<>(first, second, third, fourth); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/tuple/SimplePair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.tuple; 23 | 24 | public record SimplePair(T first, T second) { 25 | public static SimplePair of(T first, T second) { 26 | return new SimplePair<>(first, second); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/tuple/SimpleQuad.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.tuple; 23 | 24 | public record SimpleQuad(T first, T second, T third, T fourth) { 25 | public static SimpleQuad of(T first, T second, T third, T fourth) { 26 | return new SimpleQuad<>(first, second, third, fourth); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/tuple/SimpleTriple.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.tuple; 23 | 24 | public record SimpleTriple(T first, T second, T third) { 25 | public static SimpleTriple of(T first, T second, T third) { 26 | return new SimpleTriple<>(first, second, third); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /citydb-core/src/main/java/org/citydb/core/tuple/Triple.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.core.tuple; 23 | 24 | public record Triple(T first, U second, V third) { 25 | public static Triple of(T first, U second, V third) { 26 | return new Triple<>(first, second, third); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /citydb-database-postgres/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation project(':citydb-database') 3 | implementation 'org.postgresql:postgresql:42.7.5' 4 | } -------------------------------------------------------------------------------- /citydb-database-postgres/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.database.postgres { 2 | requires org.citydb.database; 3 | requires org.postgresql.jdbc; 4 | 5 | exports org.citydb.database.postgres; 6 | 7 | provides org.citydb.database.adapter.DatabaseAdapter with org.citydb.database.postgres.PostgresqlAdapter; 8 | } -------------------------------------------------------------------------------- /citydb-database-postgres/src/main/resources/org/citydb/database/postgres/query_recursive_implicit_geometry.sql: -------------------------------------------------------------------------------- 1 | WITH RECURSIVE FEATURES AS ( 2 | {} 3 | ), FEATURE_HIERARCHY AS 4 | (SELECT NULL::bigint AS ID, 5 | F.ID AS FEATURE_ID, 6 | NULL::text AS VAL_LOD, 7 | NULL::bigint AS VAL_IMPLICITGEOM_ID, 8 | F.ID AS VAL_FEATURE_ID, 9 | 1 AS VAL_RELATION_TYPE, 10 | FALSE AS IS_CYCLE, 11 | ARRAY[]::bigint[] AS PATH 12 | FROM @SCHEMA@.FEATURE F 13 | INNER JOIN FEATURES Q on Q.ID = F.ID 14 | UNION ALL SELECT 15 | P.ID, 16 | P.FEATURE_ID, 17 | P.VAL_LOD, 18 | P.VAL_IMPLICITGEOM_ID, 19 | P.VAL_FEATURE_ID, 20 | P.VAL_RELATION_TYPE, 21 | P.ID = ANY(PATH), 22 | PATH || P.ID 23 | FROM @SCHEMA@.PROPERTY P 24 | INNER JOIN FEATURE_HIERARCHY H ON H.VAL_FEATURE_ID = P.FEATURE_ID AND H.VAL_RELATION_TYPE = 1 25 | WHERE NOT IS_CYCLE) 26 | SELECT DISTINCT 27 | H.VAL_IMPLICITGEOM_ID AS ID, 28 | H.VAL_LOD AS LOD 29 | FROM FEATURE_HIERARCHY H 30 | WHERE H.VAL_IMPLICITGEOM_ID IS NOT NULL -------------------------------------------------------------------------------- /citydb-database/build.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.filters.ReplaceTokens 2 | 3 | def geotools_version = '32.2' 4 | 5 | dependencies { 6 | api project(':citydb-core') 7 | api project(':citydb-config') 8 | api project(':citydb-logging') 9 | api project(':citydb-model') 10 | api 'org.citydb:sqlbuilder:3.0.3' 11 | api "org.geotools:gt-referencing:$geotools_version" 12 | api 'systems.uom:systems-quantity:2.1' 13 | implementation 'org.apache.tomcat:tomcat-jdbc:11.0.5' 14 | implementation "org.geotools:gt-epsg-wkt:$geotools_version" 15 | implementation "org.geotools:gt-epsg-extension:$geotools_version" 16 | } 17 | 18 | processResources { 19 | outputs.upToDateWhen { false } 20 | filteringCharset = 'ISO-8859-1' 21 | filesMatching('**/database.properties') { 22 | filter(ReplaceTokens, tokens: [ 23 | citydbName: citydbName, 24 | citydbShortName: citydbShortName 25 | ]) 26 | } 27 | } -------------------------------------------------------------------------------- /citydb-database/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | @SuppressWarnings("requires-transitive-automatic") 2 | module org.citydb.database { 3 | requires org.apache.tomcat.jdbc; 4 | requires transitive org.citydb.core; 5 | requires transitive org.citydb.config; 6 | requires transitive org.citydb.logging; 7 | requires transitive org.citydb.model; 8 | requires transitive org.citydb.sqlbuilder; 9 | requires transitive org.geotools.api; 10 | requires transitive org.geotools.metadata; 11 | requires transitive org.geotools.referencing; 12 | requires transitive java.sql; 13 | requires transitive si.uom.units; 14 | requires transitive systems.uom.common; 15 | 16 | exports org.citydb.database; 17 | exports org.citydb.database.adapter; 18 | exports org.citydb.database.connection; 19 | exports org.citydb.database.geometry; 20 | exports org.citydb.database.metadata; 21 | exports org.citydb.database.schema; 22 | exports org.citydb.database.srs; 23 | exports org.citydb.database.util; 24 | 25 | uses org.citydb.database.adapter.DatabaseAdapter; 26 | } -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/DatabaseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database; 23 | 24 | public class DatabaseException extends Exception { 25 | 26 | public DatabaseException() { 27 | } 28 | 29 | public DatabaseException(String message) { 30 | super(message); 31 | } 32 | 33 | public DatabaseException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public DatabaseException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/adapter/DatabaseAdapterException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.adapter; 23 | 24 | public class DatabaseAdapterException extends Exception { 25 | 26 | public DatabaseAdapterException() { 27 | } 28 | 29 | public DatabaseAdapterException(String message) { 30 | super(message); 31 | } 32 | 33 | public DatabaseAdapterException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public DatabaseAdapterException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/adapter/DatabaseType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.adapter; 23 | 24 | import java.lang.annotation.*; 25 | 26 | @Documented 27 | @Target(value = ElementType.TYPE) 28 | @Retention(value = RetentionPolicy.RUNTIME) 29 | public @interface DatabaseType { 30 | String name(); 31 | } 32 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/connection/PoolOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.connection; 23 | 24 | public class PoolOptions { 25 | public static final int DEFAULT_LOGIN_TIMEOUT = 60; 26 | 27 | private int loginTimeout = DEFAULT_LOGIN_TIMEOUT; 28 | 29 | public static PoolOptions of(PoolOptions other) { 30 | return new PoolOptions() 31 | .setLoginTimeout(other.loginTimeout); 32 | } 33 | 34 | public int getLoginTimeout() { 35 | return loginTimeout; 36 | } 37 | 38 | public PoolOptions setLoginTimeout(int loginTimeout) { 39 | this.loginTimeout = loginTimeout; 40 | return this; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/geometry/GeometryException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.geometry; 23 | 24 | public class GeometryException extends Exception { 25 | 26 | public GeometryException() { 27 | } 28 | 29 | public GeometryException(String message) { 30 | super(message); 31 | } 32 | 33 | public GeometryException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public GeometryException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/geometry/Properties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.geometry; 23 | 24 | public class Properties { 25 | public static final String JSON_KEY_OBJECT_ID = "objectId"; 26 | public static final String JSON_KEY_IS_2D = "is2D"; 27 | public static final String JSON_KEY_CHILDREN = "children"; 28 | public static final String JSON_KEY_TYPE = "type"; 29 | public static final String JSON_KEY_PARENT = "parent"; 30 | public static final String JSON_KEY_GEOMETRY_INDEX = "geometryIndex"; 31 | public static final String JSON_KEY_IS_REVERSED = "isReversed"; 32 | } 33 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/geometry/WKBConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.geometry; 23 | 24 | public class WKBConstants { 25 | public static final int POINT = 1; 26 | public static final int LINESTRING = 2; 27 | public static final int POLYGON = 3; 28 | public static final int MULTIPOINT = 4; 29 | public static final int MULTILINESTRING = 5; 30 | public static final int MULTIPOLYGON = 6; 31 | public static final int GEOMETRYCOLLECTION = 7; 32 | public static final int POLYHEDRALSURFACE = 15; 33 | } 34 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/Column.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | import java.util.Locale; 25 | 26 | public class Column { 27 | private final String name; 28 | private final ColumnType type; 29 | 30 | Column(String name, ColumnType type) { 31 | this.name = name.toLowerCase(Locale.ROOT); 32 | this.type = type; 33 | } 34 | 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | public ColumnType getType() { 40 | return type; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/ColumnType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | public interface ColumnType { 25 | String getIdentifier(); 26 | 27 | static ColumnType of(String name) { 28 | ColumnType type = SimpleType.of(name); 29 | return type != null ? type : GeometryType.of(name); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/Joinable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | import java.util.Optional; 25 | 26 | public interface Joinable extends SchemaObject { 27 | Optional getJoin(); 28 | 29 | Optional getJoinTable(); 30 | } 31 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/SchemaException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | public class SchemaException extends Exception { 25 | 26 | public SchemaException() { 27 | } 28 | 29 | public SchemaException(String message) { 30 | super(message); 31 | } 32 | 33 | public SchemaException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public SchemaException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/SchemaObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | import org.citydb.model.common.Name; 25 | 26 | public interface SchemaObject { 27 | Name getName(); 28 | } 29 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/Typeable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | import java.util.Optional; 25 | 26 | public interface Typeable extends SchemaObject { 27 | Optional getType(); 28 | } 29 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/schema/ValueObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.schema; 23 | 24 | import java.util.Optional; 25 | 26 | public interface ValueObject extends SchemaObject { 27 | Optional getValue(); 28 | } 29 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/srs/SpatialReferenceType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.srs; 23 | 24 | public enum SpatialReferenceType { 25 | PROJECTED_CRS, 26 | GEOGRAPHIC_CRS, 27 | GEOGRAPHIC3D_CRS, 28 | GEODETIC_CRS, 29 | GEOCENTRIC_CRS, 30 | COMPOUND_CRS, 31 | ENGINEERING_CRS, 32 | UNKNOWN_CRS 33 | } 34 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/srs/SrsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.srs; 23 | 24 | public class SrsException extends Exception { 25 | 26 | public SrsException() { 27 | } 28 | 29 | public SrsException(String message) { 30 | super(message); 31 | } 32 | 33 | public SrsException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public SrsException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-database/src/main/java/org/citydb/database/util/TempTableHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.database.util; 23 | 24 | import java.util.Map; 25 | 26 | public interface TempTableHelper { 27 | String getInteger(); 28 | 29 | String getLong(); 30 | 31 | String getDouble(); 32 | 33 | String getNumeric(); 34 | 35 | String getNumeric(int precision); 36 | 37 | String getNumeric(int precision, int scale); 38 | 39 | String getString(); 40 | 41 | String getString(int size); 42 | 43 | String getTimeStamp(); 44 | 45 | String getTimeStampWithTimeZone(); 46 | 47 | String getGeometry(); 48 | 49 | String getCreateTempTable(String name, Map columns); 50 | } 51 | -------------------------------------------------------------------------------- /citydb-database/src/main/resources/org/citydb/database/database.properties: -------------------------------------------------------------------------------- 1 | citydbName=@citydbName@ 2 | citydbShortName=@citydbShortName@ -------------------------------------------------------------------------------- /citydb-io-citygml/build.gradle: -------------------------------------------------------------------------------- 1 | def citygml4j_version = '3.2.4' 2 | 3 | dependencies { 4 | api project(':citydb-logging') 5 | api "org.citygml4j:citygml4j-xml:$citygml4j_version" 6 | api "org.citygml4j:citygml4j-cityjson:$citygml4j_version" 7 | implementation project(':citydb-io') 8 | runtimeOnly 'com.fasterxml.woodstox:woodstox-core:7.1.0' 9 | annotationProcessor "org.citygml4j:citygml4j-xml:$citygml4j_version" 10 | } -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/bridge/BridgeFurniturePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.bridge; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.bridge.BridgeFurnitureProperty; 28 | 29 | public class BridgeFurniturePropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public BridgeFurnitureProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new BridgeFurnitureProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/bridge/BridgePartPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.bridge; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.bridge.BridgePartProperty; 28 | 29 | public class BridgePartPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public BridgePartProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new BridgePartProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/bridge/BridgeRoomPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.bridge; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.bridge.BridgeRoomProperty; 28 | 29 | public class BridgeRoomPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public BridgeRoomProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new BridgeRoomProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/building/BuildingPartPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.building; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.building.BuildingPartProperty; 28 | 29 | public class BuildingPartPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public BuildingPartProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new BuildingPartProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/building/BuildingRoomPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.building; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.building.BuildingRoomProperty; 28 | 29 | public class BuildingRoomPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public BuildingRoomProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new BuildingRoomProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/building/BuildingUnitPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.building; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.building.BuildingUnitProperty; 28 | 29 | public class BuildingUnitPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public BuildingUnitProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new BuildingUnitProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/building/StoreyPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.building; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.building.StoreyProperty; 28 | 29 | public class StoreyPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public StoreyProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new StoreyProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/construction/AbstractFillingElementAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.construction; 23 | 24 | import org.citydb.io.citygml.adapter.core.AbstractOccupiedSpaceAdapter; 25 | import org.citygml4j.core.model.construction.AbstractFillingElement; 26 | 27 | public abstract class AbstractFillingElementAdapter extends AbstractOccupiedSpaceAdapter { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/construction/AbstractFurnitureAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.construction; 23 | 24 | import org.citydb.io.citygml.adapter.core.AbstractOccupiedSpaceAdapter; 25 | import org.citygml4j.core.model.construction.AbstractFurniture; 26 | 27 | public abstract class AbstractFurnitureAdapter extends AbstractOccupiedSpaceAdapter { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/core/AbstractCityObjectReferenceAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.core; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractReferenceAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.core.AbstractCityObjectReference; 28 | 29 | public class AbstractCityObjectReferenceAdapter extends AbstractReferenceAdapter { 30 | 31 | @Override 32 | public AbstractCityObjectReference createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new AbstractCityObjectReference(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/core/AbstractLogicalSpaceAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.core; 23 | 24 | import org.citygml4j.core.model.core.AbstractLogicalSpace; 25 | 26 | public abstract class AbstractLogicalSpaceAdapter extends AbstractSpaceAdapter { 27 | } 28 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/core/AbstractSpaceBoundaryAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.core; 23 | 24 | import org.citygml4j.core.model.core.AbstractSpaceBoundary; 25 | 26 | public abstract class AbstractSpaceBoundaryAdapter extends AbstractCityObjectAdapter { 27 | final SpaceBoundaryGeometrySupport geometrySupport = new SpaceBoundaryGeometrySupport<>(); 28 | 29 | public AbstractSpaceBoundaryAdapter() { 30 | configureSerializer(geometrySupport); 31 | } 32 | 33 | protected void configureSerializer(SpaceBoundaryGeometrySupport geometrySupport) { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/core/AbstractUnoccupiedSpaceAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.core; 23 | 24 | import org.citygml4j.core.model.core.AbstractUnoccupiedSpace; 25 | 26 | public abstract class AbstractUnoccupiedSpaceAdapter extends AbstractPhysicalSpaceAdapter { 27 | } 28 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/builder/GeometryBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.builder; 23 | 24 | import org.citydb.io.citygml.builder.ModelBuildException; 25 | import org.citydb.model.geometry.Geometry; 26 | import org.xmlobjects.gml.model.geometry.AbstractGeometry; 27 | 28 | public abstract class GeometryBuilder { 29 | abstract Geometry build(AbstractGeometry source) throws ModelBuildException; 30 | } 31 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/builder/Lod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.builder; 23 | 24 | public class Lod { 25 | public static final Lod NONE = new Lod(null); 26 | private final String value; 27 | 28 | private Lod(String value) { 29 | this.value = value; 30 | } 31 | 32 | public static Lod of(String value) { 33 | return new Lod(value); 34 | } 35 | 36 | public static Lod of(int value) { 37 | return new Lod(String.valueOf(value)); 38 | } 39 | 40 | public String getValue() { 41 | return value; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/CurvePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.primitives.CurveProperty; 27 | 28 | public class CurvePropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public CurveProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new CurveProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/ExtentPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.citygml4j.core.model.relief.ExtentProperty; 27 | 28 | public class ExtentPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public ExtentProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new ExtentProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/GeometricComplexPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.complexes.GeometricComplexProperty; 27 | 28 | public class GeometricComplexPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public GeometricComplexProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new GeometricComplexProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/GeometricPrimitivePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.primitives.GeometricPrimitiveProperty; 27 | 28 | public class GeometricPrimitivePropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public GeometricPrimitiveProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new GeometricPrimitiveProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/GeometryPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.xmlobjects.gml.model.geometry.GeometryProperty; 26 | 27 | public class GeometryPropertyAdapter extends AbstractGeometryPropertyAdapter> { 28 | 29 | @Override 30 | public GeometryProperty createObject(org.citydb.model.property.GeometryProperty source) throws ModelSerializeException { 31 | return new GeometryProperty<>(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/MultiCurvePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.aggregates.MultiCurveProperty; 27 | 28 | public class MultiCurvePropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public MultiCurveProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new MultiCurveProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/MultiPointPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.aggregates.MultiPointProperty; 27 | 28 | public class MultiPointPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public MultiPointProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new MultiPointProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/MultiSolidPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.aggregates.MultiSolidProperty; 27 | 28 | public class MultiSolidPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public MultiSolidProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new MultiSolidProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/MultiSurfacePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty; 27 | 28 | public class MultiSurfacePropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public MultiSurfaceProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new MultiSurfaceProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/PointPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.primitives.PointProperty; 27 | 28 | public class PointPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public PointProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new PointProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/SolidPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.primitives.SolidProperty; 27 | 28 | public class SolidPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public SolidProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new SolidProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/SurfacePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.xmlobjects.gml.model.geometry.primitives.SurfaceProperty; 27 | 28 | public class SurfacePropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public SurfaceProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new SurfaceProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/geometry/serializer/TinPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.geometry.serializer; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.GeometryProperty; 26 | import org.citygml4j.core.model.relief.TinProperty; 27 | 28 | public class TinPropertyAdapter extends AbstractGeometryPropertyAdapter { 29 | 30 | @Override 31 | public TinProperty createObject(GeometryProperty source) throws ModelSerializeException { 32 | return new TinProperty(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/gml/AreaAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.gml; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.Attribute; 26 | import org.xmlobjects.gml.model.measures.Area; 27 | 28 | public class AreaAdapter extends AbstractMeasureAdapter { 29 | 30 | @Override 31 | public Area createObject(Attribute source) throws ModelSerializeException { 32 | return new Area(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/gml/LengthAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.gml; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.Attribute; 26 | import org.xmlobjects.gml.model.measures.Length; 27 | 28 | public class LengthAdapter extends AbstractMeasureAdapter { 29 | 30 | @Override 31 | public Length createObject(Attribute source) throws ModelSerializeException { 32 | return new Length(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/gml/MeasureAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.gml; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.Attribute; 26 | import org.xmlobjects.gml.model.basictypes.Measure; 27 | 28 | public class MeasureAdapter extends AbstractMeasureAdapter { 29 | 30 | @Override 31 | public Measure createObject(Attribute source) throws ModelSerializeException { 32 | return new Measure(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/gml/VolumeAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.gml; 23 | 24 | import org.citydb.io.citygml.serializer.ModelSerializeException; 25 | import org.citydb.model.property.Attribute; 26 | import org.xmlobjects.gml.model.measures.Volume; 27 | 28 | public class VolumeAdapter extends AbstractMeasureAdapter { 29 | 30 | @Override 31 | public Volume createObject(Attribute source) throws ModelSerializeException { 32 | return new Volume(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/transportation/HolePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.transportation; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.transportation.HoleProperty; 28 | 29 | public class HolePropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public HoleProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new HoleProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/transportation/MarkingPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.transportation; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.transportation.MarkingProperty; 28 | 29 | public class MarkingPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public MarkingProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new MarkingProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/transportation/SectionPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.transportation; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.transportation.SectionProperty; 28 | 29 | public class SectionPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public SectionProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new SectionProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/transportation/TrafficSpaceReferenceAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.transportation; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractReferenceAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.transportation.TrafficSpaceReference; 28 | 29 | public class TrafficSpaceReferenceAdapter extends AbstractReferenceAdapter { 30 | 31 | @Override 32 | public TrafficSpaceReference createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new TrafficSpaceReference(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/tunnel/HollowSpacePropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.tunnel; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.tunnel.HollowSpaceProperty; 28 | 29 | public class HollowSpacePropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public HollowSpaceProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new HollowSpaceProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/tunnel/TunnelPartPropertyAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.tunnel; 23 | 24 | import org.citydb.io.citygml.adapter.gml.AbstractInlineOrByReferencePropertyAdapter; 25 | import org.citydb.io.citygml.serializer.ModelSerializeException; 26 | import org.citydb.model.property.FeatureProperty; 27 | import org.citygml4j.core.model.tunnel.TunnelPartProperty; 28 | 29 | public class TunnelPartPropertyAdapter extends AbstractInlineOrByReferencePropertyAdapter { 30 | 31 | @Override 32 | public TunnelPartProperty createObject(FeatureProperty source) throws ModelSerializeException { 33 | return new TunnelPartProperty(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/vegetation/AbstractVegetationObjectAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.vegetation; 23 | 24 | import org.citydb.io.citygml.adapter.core.AbstractOccupiedSpaceAdapter; 25 | import org.citygml4j.core.model.vegetation.AbstractVegetationObject; 26 | 27 | public abstract class AbstractVegetationObjectAdapter extends AbstractOccupiedSpaceAdapter { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/adapter/waterbody/AbstractWaterBoundarySurfaceAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.adapter.waterbody; 23 | 24 | import org.citydb.io.citygml.adapter.core.AbstractThematicSurfaceAdapter; 25 | import org.citygml4j.core.model.waterbody.AbstractWaterBoundarySurface; 26 | 27 | public abstract class AbstractWaterBoundarySurfaceAdapter extends AbstractThematicSurfaceAdapter { 28 | } 29 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/annotation/DatabaseType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.annotation; 23 | 24 | import java.lang.annotation.*; 25 | 26 | @Documented 27 | @Target(value = ElementType.TYPE) 28 | @Retention(value = RetentionPolicy.RUNTIME) 29 | public @interface DatabaseType { 30 | String name(); 31 | 32 | String namespace(); 33 | } 34 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/annotation/DatabaseTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.annotation; 23 | 24 | import java.lang.annotation.*; 25 | 26 | @Documented 27 | @Target(value = ElementType.TYPE) 28 | @Retention(value = RetentionPolicy.RUNTIME) 29 | public @interface DatabaseTypes { 30 | DatabaseType[] value(); 31 | } 32 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/builder/ModelBuildException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.builder; 23 | 24 | public class ModelBuildException extends Exception { 25 | 26 | public ModelBuildException() { 27 | } 28 | 29 | public ModelBuildException(String message) { 30 | super(message); 31 | } 32 | 33 | public ModelBuildException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ModelBuildException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/builder/ModelBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.builder; 23 | 24 | import org.atteo.classindex.IndexSubclasses; 25 | import org.citydb.io.citygml.reader.ModelBuilderHelper; 26 | import org.citydb.model.common.Child; 27 | 28 | @IndexSubclasses 29 | public interface ModelBuilder { 30 | default R createModel(T source) throws ModelBuildException { 31 | return null; 32 | } 33 | 34 | void build(T source, R target, ModelBuilderHelper helper) throws ModelBuildException; 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/serializer/ModelSerializeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.serializer; 23 | 24 | public class ModelSerializeException extends Exception { 25 | 26 | public ModelSerializeException() { 27 | } 28 | 29 | public ModelSerializeException(String message) { 30 | super(message); 31 | } 32 | 33 | public ModelSerializeException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ModelSerializeException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/serializer/ModelSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.serializer; 23 | 24 | import org.atteo.classindex.IndexSubclasses; 25 | import org.citydb.io.citygml.writer.ModelSerializerHelper; 26 | import org.citydb.model.common.Child; 27 | 28 | @IndexSubclasses 29 | public interface ModelSerializer { 30 | R createObject(T source) throws ModelSerializeException; 31 | 32 | void serialize(T source, R target, ModelSerializerHelper helper) throws ModelSerializeException; 33 | 34 | default void postSerialize(T source, R target, ModelSerializerHelper helper) throws ModelSerializeException { 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /citydb-io-citygml/src/main/java/org/citydb/io/citygml/writer/util/GlobalFeatureWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.citygml.writer.util; 23 | 24 | import org.citydb.io.writer.WriteException; 25 | import org.citygml4j.core.model.core.AbstractFeature; 26 | 27 | public interface GlobalFeatureWriter { 28 | void write(AbstractFeature feature) throws WriteException; 29 | } 30 | -------------------------------------------------------------------------------- /citydb-io/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':citydb-config') 3 | api project(':citydb-core') 4 | api project(':citydb-model') 5 | } -------------------------------------------------------------------------------- /citydb-io/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.io { 2 | requires java.sql; 3 | requires transitive org.citydb.config; 4 | requires transitive org.citydb.core; 5 | requires transitive org.citydb.model; 6 | 7 | exports org.citydb.io; 8 | exports org.citydb.io.reader; 9 | exports org.citydb.io.reader.filter; 10 | exports org.citydb.io.reader.options; 11 | exports org.citydb.io.util; 12 | exports org.citydb.io.validator; 13 | exports org.citydb.io.writer; 14 | exports org.citydb.io.writer.options; 15 | 16 | uses org.citydb.io.IOAdapter; 17 | } -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/FileFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io; 23 | 24 | import java.lang.annotation.*; 25 | 26 | @Documented 27 | @Target(value = ElementType.TYPE) 28 | @Retention(value = RetentionPolicy.RUNTIME) 29 | public @interface FileFormat { 30 | String name(); 31 | 32 | String mediaType(); 33 | 34 | String[] fileExtensions(); 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/IOAdapterException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io; 23 | 24 | public class IOAdapterException extends Exception { 25 | 26 | public IOAdapterException() { 27 | } 28 | 29 | public IOAdapterException(String message) { 30 | super(message); 31 | } 32 | 33 | public IOAdapterException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public IOAdapterException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/reader/FeatureReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.reader; 23 | 24 | import org.citydb.model.feature.Feature; 25 | 26 | import java.util.function.Consumer; 27 | 28 | public interface FeatureReader extends AutoCloseable { 29 | void read(Consumer consumer) throws ReadException; 30 | 31 | void cancel(); 32 | 33 | @Override 34 | void close() throws ReadException; 35 | } 36 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/reader/ReadException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.reader; 23 | 24 | public class ReadException extends Exception { 25 | 26 | public ReadException() { 27 | } 28 | 29 | public ReadException(String message) { 30 | super(message); 31 | } 32 | 33 | public ReadException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ReadException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/reader/filter/Filter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.reader.filter; 23 | 24 | import org.citydb.model.feature.Feature; 25 | 26 | @FunctionalInterface 27 | public interface Filter { 28 | enum Result { 29 | ACCEPT, 30 | SKIP, 31 | STOP 32 | } 33 | 34 | static Filter acceptAll() { 35 | return feature -> Result.ACCEPT; 36 | } 37 | 38 | default boolean needsSequentialProcessing() { 39 | return false; 40 | } 41 | 42 | Result test(Feature feature) throws FilterException; 43 | } 44 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/reader/filter/FilterException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.reader.filter; 23 | 24 | public class FilterException extends Exception { 25 | 26 | public FilterException() { 27 | } 28 | 29 | public FilterException(String message) { 30 | super(message); 31 | } 32 | 33 | public FilterException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public FilterException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/reader/filter/FilterPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.reader.filter; 23 | 24 | import org.citydb.model.feature.Feature; 25 | 26 | @FunctionalInterface 27 | public interface FilterPredicate { 28 | boolean test(Feature feature) throws FilterException; 29 | } 30 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/reader/options/InputFormatOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.reader.options; 23 | 24 | public interface InputFormatOptions { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/validator/ValidateException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.validator; 23 | 24 | public class ValidateException extends Exception { 25 | 26 | public ValidateException() { 27 | } 28 | 29 | public ValidateException(String message) { 30 | super(message); 31 | } 32 | 33 | public ValidateException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ValidateException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/validator/Validator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.validator; 23 | 24 | import org.citydb.core.file.InputFile; 25 | 26 | public interface Validator extends AutoCloseable { 27 | void validate(InputFile file) throws ValidateException; 28 | 29 | void cancel(); 30 | 31 | @Override 32 | void close() throws ValidateException; 33 | } 34 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/writer/FeatureWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.writer; 23 | 24 | import org.citydb.model.feature.Feature; 25 | 26 | import java.util.concurrent.CompletableFuture; 27 | import java.util.function.BiConsumer; 28 | 29 | public interface FeatureWriter extends AutoCloseable { 30 | CompletableFuture write(Feature feature) throws WriteException; 31 | 32 | default void write(Feature feature, BiConsumer onCompletion) throws WriteException { 33 | write(feature).whenComplete(onCompletion); 34 | } 35 | 36 | void cancel(); 37 | 38 | @Override 39 | void close() throws WriteException; 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/writer/WriteException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.writer; 23 | 24 | public class WriteException extends Exception { 25 | 26 | public WriteException() { 27 | } 28 | 29 | public WriteException(String message) { 30 | super(message); 31 | } 32 | 33 | public WriteException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public WriteException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-io/src/main/java/org/citydb/io/writer/options/OutputFormatOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.io.writer.options; 23 | 24 | public interface OutputFormatOptions { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-logging/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.apache.logging.log4j:log4j-api:2.24.3' 3 | implementation 'org.apache.logging.log4j:log4j-core:2.24.3' 4 | implementation 'org.slf4j:slf4j-nop:2.0.16' 5 | } -------------------------------------------------------------------------------- /citydb-logging/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.logging { 2 | requires org.apache.logging.log4j.core; 3 | requires org.slf4j; 4 | requires transitive org.apache.logging.log4j; 5 | 6 | exports org.citydb.logging; 7 | } -------------------------------------------------------------------------------- /citydb-logging/src/main/java/org/citydb/logging/LogConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.logging; 23 | 24 | import org.apache.logging.log4j.Marker; 25 | import org.apache.logging.log4j.MarkerManager; 26 | 27 | public class LogConstants { 28 | public static final String DEFAULT_LOG_PATTERN = "[%d{HH:mm:ss} %p] %m%n"; 29 | public static final String DEFAULT_LOG_FILE = "citydb.log"; 30 | public static final String DEFAULT_ROLLING_FILE_SUFFIX = "-%d{yyyy-MM-dd}"; 31 | public static final Marker PLAIN_MARKER = MarkerManager.getMarker("PLAIN"); 32 | } 33 | -------------------------------------------------------------------------------- /citydb-model/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation project(':citydb-config') 3 | } -------------------------------------------------------------------------------- /citydb-model/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.model { 2 | requires org.citydb.config; 3 | 4 | exports org.citydb.model.address; 5 | exports org.citydb.model.appearance; 6 | exports org.citydb.model.common; 7 | exports org.citydb.model.encoding; 8 | exports org.citydb.model.feature; 9 | exports org.citydb.model.geometry; 10 | exports org.citydb.model.property; 11 | exports org.citydb.model.util; 12 | exports org.citydb.model.util.matrix; 13 | exports org.citydb.model.walker; 14 | } -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/address/AddressDescriptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.address; 23 | 24 | import org.citydb.model.common.DatabaseDescriptor; 25 | 26 | public class AddressDescriptor extends DatabaseDescriptor { 27 | 28 | private AddressDescriptor(long id) { 29 | super(id); 30 | } 31 | 32 | public static AddressDescriptor of(long id) { 33 | return new AddressDescriptor(id); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/DatabaseDescriptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | import java.io.Serializable; 25 | 26 | public abstract class DatabaseDescriptor implements Serializable { 27 | private final long id; 28 | 29 | public DatabaseDescriptor(long id) { 30 | this.id = id; 31 | } 32 | 33 | public long getId() { 34 | return id; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/Describable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | import java.util.Optional; 25 | 26 | public interface Describable { 27 | Optional getDescriptor(); 28 | 29 | Describable setDescriptor(T descriptor); 30 | } 31 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/Identifiable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | import java.util.Optional; 25 | 26 | public interface Identifiable extends Referencable { 27 | Optional getIdentifier(); 28 | 29 | Identifiable setIdentifier(String identifier); 30 | 31 | Optional getIdentifierCodeSpace(); 32 | 33 | Identifiable setIdentifierCodeSpace(String identifierCodeSpace); 34 | } 35 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/InlineOrByReferenceProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | import java.util.Optional; 25 | 26 | public interface InlineOrByReferenceProperty { 27 | Optional getObject(); 28 | 29 | InlineOrByReferenceProperty setObject(T object); 30 | 31 | Optional getReference(); 32 | 33 | InlineOrByReferenceProperty setReference(Reference reference); 34 | } 35 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/InlineProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | public interface InlineProperty { 25 | T getObject(); 26 | 27 | InlineProperty setObject(T object); 28 | } 29 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/Referencable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | import org.citydb.model.util.IdCreator; 25 | 26 | import java.util.Optional; 27 | 28 | public interface Referencable { 29 | Optional getObjectId(); 30 | 31 | Referencable setObjectId(String objectId); 32 | 33 | default String getOrCreateObjectId(IdCreator idCreator) { 34 | return getObjectId().orElseGet(() -> { 35 | String objectId = idCreator.createId(); 36 | setObjectId(objectId); 37 | return objectId; 38 | }); 39 | } 40 | 41 | default String getOrCreateObjectId() { 42 | return getOrCreateObjectId(IdCreator.getInstance()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/Reference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | import java.util.Objects; 25 | 26 | public class Reference extends Child { 27 | private final String target; 28 | 29 | private Reference(String target) { 30 | this.target = Objects.requireNonNull(target, "The reference target must not be null."); 31 | } 32 | 33 | public static Reference of(String target) { 34 | return new Reference(target); 35 | } 36 | 37 | public String getTarget() { 38 | return target; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/common/Visitable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.common; 23 | 24 | public interface Visitable { 25 | void accept(Visitor visitor); 26 | } 27 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/encoding/Matrix3x4Writer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.encoding; 23 | 24 | import com.alibaba.fastjson2.JSONWriter; 25 | import com.alibaba.fastjson2.writer.ObjectWriter; 26 | import org.citydb.model.common.Matrix3x4; 27 | 28 | import java.lang.reflect.Type; 29 | 30 | public class Matrix3x4Writer implements ObjectWriter { 31 | @Override 32 | public void write(JSONWriter jsonWriter, Object o, Object o1, Type type, long l) { 33 | if (o instanceof Matrix3x4 matrix) { 34 | jsonWriter.write(matrix.toRowMajor()); 35 | } else { 36 | jsonWriter.writeNull(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/feature/FeatureTypeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.feature; 23 | 24 | import org.citydb.model.common.Name; 25 | 26 | @FunctionalInterface 27 | public interface FeatureTypeProvider { 28 | Name getName(); 29 | } 30 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/geometry/GeometryDescriptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.geometry; 23 | 24 | import org.citydb.model.common.DatabaseDescriptor; 25 | 26 | public class GeometryDescriptor extends DatabaseDescriptor { 27 | private final long featureId; 28 | 29 | private GeometryDescriptor(long id, long featureId) { 30 | super(id); 31 | this.featureId = featureId; 32 | } 33 | 34 | public static GeometryDescriptor of(long id, long featureId) { 35 | return new GeometryDescriptor(id, featureId); 36 | } 37 | 38 | public long getFeatureId() { 39 | return featureId; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/geometry/SpatialObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.geometry; 23 | 24 | public interface SpatialObject extends SrsReference { 25 | int getVertexDimension(); 26 | } 27 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/geometry/Surface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.geometry; 23 | 24 | public abstract class Surface> extends Geometry { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-model/src/main/java/org/citydb/model/property/DataTypeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.model.property; 23 | 24 | import org.citydb.model.common.Name; 25 | 26 | @FunctionalInterface 27 | public interface DataTypeProvider { 28 | Name getName(); 29 | } 30 | -------------------------------------------------------------------------------- /citydb-operation/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':citydb-database') 3 | implementation project(':citydb-config') 4 | } -------------------------------------------------------------------------------- /citydb-operation/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.operation { 2 | requires org.citydb.config; 3 | requires transitive org.citydb.database; 4 | 5 | exports org.citydb.operation.deleter; 6 | exports org.citydb.operation.deleter.common; 7 | exports org.citydb.operation.deleter.feature; 8 | exports org.citydb.operation.deleter.options; 9 | exports org.citydb.operation.deleter.util; 10 | exports org.citydb.operation.exporter; 11 | exports org.citydb.operation.exporter.address; 12 | exports org.citydb.operation.exporter.appearance; 13 | exports org.citydb.operation.exporter.common; 14 | exports org.citydb.operation.exporter.feature; 15 | exports org.citydb.operation.exporter.geometry; 16 | exports org.citydb.operation.exporter.hierarchy; 17 | exports org.citydb.operation.exporter.options; 18 | exports org.citydb.operation.exporter.property; 19 | exports org.citydb.operation.exporter.util; 20 | exports org.citydb.operation.importer; 21 | exports org.citydb.operation.importer.address; 22 | exports org.citydb.operation.importer.appearance; 23 | exports org.citydb.operation.importer.common; 24 | exports org.citydb.operation.importer.feature; 25 | exports org.citydb.operation.importer.geometry; 26 | exports org.citydb.operation.importer.property; 27 | exports org.citydb.operation.importer.reference; 28 | exports org.citydb.operation.importer.util; 29 | } -------------------------------------------------------------------------------- /citydb-operation/src/main/java/org/citydb/operation/deleter/DeleteException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.operation.deleter; 23 | 24 | public class DeleteException extends Exception { 25 | 26 | public DeleteException() { 27 | } 28 | 29 | public DeleteException(String message) { 30 | super(message); 31 | } 32 | 33 | public DeleteException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public DeleteException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-operation/src/main/java/org/citydb/operation/deleter/util/DeleteLogger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.operation.deleter.util; 23 | 24 | import org.citydb.operation.deleter.DeleteException; 25 | 26 | @FunctionalInterface 27 | public interface DeleteLogger { 28 | void log(DeleteLogEntry logEntry) throws DeleteException; 29 | } 30 | -------------------------------------------------------------------------------- /citydb-operation/src/main/java/org/citydb/operation/exporter/ExportConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.operation.exporter; 23 | 24 | public class ExportConstants { 25 | public static final String TEXTURE_DIR = "appearance"; 26 | public static final String TEXTURE_PREFIX = "tex_"; 27 | public static final String LIBRARY_OBJECTS_DIR = "library-objects"; 28 | public static final String LIBRARY_OBJECTS_PREFIX = "lib_"; 29 | } 30 | -------------------------------------------------------------------------------- /citydb-operation/src/main/java/org/citydb/operation/exporter/ExportException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.operation.exporter; 23 | 24 | public class ExportException extends Exception { 25 | 26 | public ExportException() { 27 | } 28 | 29 | public ExportException(String message) { 30 | super(message); 31 | } 32 | 33 | public ExportException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ExportException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-operation/src/main/java/org/citydb/operation/importer/ImportException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.operation.importer; 23 | 24 | public class ImportException extends Exception { 25 | 26 | public ImportException() { 27 | } 28 | 29 | public ImportException(String message) { 30 | super(message); 31 | } 32 | 33 | public ImportException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public ImportException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-operation/src/main/java/org/citydb/operation/importer/util/ImportLogger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.operation.importer.util; 23 | 24 | import org.citydb.operation.importer.ImportException; 25 | 26 | @FunctionalInterface 27 | public interface ImportLogger { 28 | void log(ImportLogEntry logEntry) throws ImportException; 29 | } 30 | -------------------------------------------------------------------------------- /citydb-plugin/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation project(':citydb-core') 3 | } -------------------------------------------------------------------------------- /citydb-plugin/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.plugin { 2 | requires org.citydb.core; 3 | requires com.alibaba.fastjson2; 4 | 5 | exports org.citydb.plugin; 6 | exports org.citydb.plugin.metadata; 7 | 8 | uses org.citydb.plugin.Plugin; 9 | } -------------------------------------------------------------------------------- /citydb-plugin/src/main/java/org/citydb/plugin/Extension.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.plugin; 23 | 24 | public interface Extension { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-plugin/src/main/java/org/citydb/plugin/PluginException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.plugin; 23 | 24 | public class PluginException extends Exception { 25 | 26 | public PluginException() { 27 | } 28 | 29 | public PluginException(String message) { 30 | super(message); 31 | } 32 | 33 | public PluginException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public PluginException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-plugin/src/main/java/org/citydb/plugin/metadata/PluginVendor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.plugin.metadata; 23 | 24 | public class PluginVendor { 25 | private String name; 26 | private String url; 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public PluginVendor setName(String name) { 33 | this.name = name; 34 | return this; 35 | } 36 | 37 | public String getUrl() { 38 | return url; 39 | } 40 | 41 | public PluginVendor setUrl(String url) { 42 | this.url = url; 43 | return this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /citydb-query/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':citydb-database') 3 | api project(':citydb-model') 4 | implementation project(':citydb-config') 5 | } -------------------------------------------------------------------------------- /citydb-query/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.query { 2 | requires org.citydb.config; 3 | requires transitive org.citydb.database; 4 | requires transitive org.citydb.model; 5 | requires transitive org.citydb.sqlbuilder; 6 | 7 | exports org.citydb.query; 8 | exports org.citydb.query.builder; 9 | exports org.citydb.query.builder.common; 10 | exports org.citydb.query.builder.schema; 11 | exports org.citydb.query.builder.sql; 12 | exports org.citydb.query.executor; 13 | exports org.citydb.query.filter; 14 | exports org.citydb.query.filter.common; 15 | exports org.citydb.query.filter.encoding; 16 | exports org.citydb.query.filter.function; 17 | exports org.citydb.query.filter.literal; 18 | exports org.citydb.query.filter.operation; 19 | exports org.citydb.query.lod; 20 | exports org.citydb.query.sorting; 21 | } -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/builder/QueryBuildException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.builder; 23 | 24 | public class QueryBuildException extends Exception { 25 | 26 | public QueryBuildException() { 27 | } 28 | 29 | public QueryBuildException(String message) { 30 | super(message); 31 | } 32 | 33 | public QueryBuildException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public QueryBuildException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/builder/schema/SchemaPathException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.builder.schema; 23 | 24 | public class SchemaPathException extends Exception { 25 | 26 | public SchemaPathException() { 27 | } 28 | 29 | public SchemaPathException(String message) { 30 | super(message); 31 | } 32 | 33 | public SchemaPathException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public SchemaPathException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/executor/SqlFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.executor; 23 | 24 | import java.sql.ResultSet; 25 | import java.sql.SQLException; 26 | 27 | @FunctionalInterface 28 | public interface SqlFunction { 29 | R apply(ResultSet rs) throws SQLException; 30 | } 31 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/Argument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface Argument extends Expression { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/CharacterExpression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface CharacterExpression extends ScalarExpression { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/ComparisonPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface ComparisonPredicate extends Predicate { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/Expression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface Expression { 25 | void accept(FilterVisitor visitor); 26 | } 27 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/LogicalPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface LogicalPredicate extends Predicate { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/PatternExpression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface PatternExpression extends Expression { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/Predicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | import org.citydb.query.filter.operation.BooleanExpression; 25 | 26 | public interface Predicate extends BooleanExpression { 27 | BooleanExpression negate(); 28 | } 29 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/Sign.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public enum Sign { 25 | PLUS("+"), 26 | MINUS("-"); 27 | 28 | private String value; 29 | 30 | Sign(String value) { 31 | this.value = value; 32 | } 33 | 34 | public String getValue() { 35 | return value; 36 | } 37 | 38 | 39 | @Override 40 | public String toString() { 41 | return value; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/common/SpatialPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.common; 23 | 24 | public interface SpatialPredicate extends Predicate { 25 | } 26 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/encoding/FilterConfigWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.encoding; 23 | 24 | import com.alibaba.fastjson2.JSONWriter; 25 | import com.alibaba.fastjson2.writer.ObjectWriter; 26 | import org.citydb.query.filter.Filter; 27 | 28 | import java.lang.reflect.Type; 29 | 30 | public class FilterConfigWriter implements ObjectWriter { 31 | @Override 32 | public void write(JSONWriter jsonWriter, Object o, Object o1, Type type, long l) { 33 | if (o instanceof Filter filter) { 34 | FilterJSONWriter.newInstance().write(filter.getExpression(), jsonWriter); 35 | } else { 36 | jsonWriter.writeNull(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/encoding/FilterParseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.encoding; 23 | 24 | public class FilterParseException extends Exception { 25 | 26 | public FilterParseException() { 27 | } 28 | 29 | public FilterParseException(String message) { 30 | super(message); 31 | } 32 | 33 | public FilterParseException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public FilterParseException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/literal/BBoxLiteral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.literal; 23 | 24 | import org.citydb.model.geometry.Envelope; 25 | import org.citydb.query.filter.common.FilterVisitor; 26 | import org.citydb.query.filter.common.GeometryExpression; 27 | 28 | public class BBoxLiteral extends Literal implements GeometryExpression { 29 | 30 | private BBoxLiteral(Envelope value) { 31 | super(value); 32 | } 33 | 34 | public static BBoxLiteral of(Envelope value) { 35 | return new BBoxLiteral(value); 36 | } 37 | 38 | @Override 39 | public void accept(FilterVisitor visitor) { 40 | visitor.visit(this); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/filter/literal/GeometryLiteral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.filter.literal; 23 | 24 | import org.citydb.model.geometry.Geometry; 25 | import org.citydb.query.filter.common.FilterVisitor; 26 | import org.citydb.query.filter.common.GeometryExpression; 27 | 28 | public class GeometryLiteral extends Literal> implements GeometryExpression { 29 | 30 | private GeometryLiteral(Geometry value) { 31 | super(value); 32 | } 33 | 34 | public static GeometryLiteral of(Geometry value) { 35 | return new GeometryLiteral(value); 36 | } 37 | 38 | @Override 39 | public void accept(FilterVisitor visitor) { 40 | visitor.visit(this); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /citydb-query/src/main/java/org/citydb/query/sorting/SortOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2024 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.query.sorting; 23 | 24 | public enum SortOrder { 25 | ASC("asc"), 26 | DESC("desc"); 27 | 28 | private final String value; 29 | 30 | SortOrder(String value) { 31 | this.value = value; 32 | } 33 | 34 | public String toValue() { 35 | return value; 36 | } 37 | 38 | public static SortOrder fromValue(String value) { 39 | for (SortOrder v : SortOrder.values()) { 40 | if (v.value.equals(value)) { 41 | return v; 42 | } 43 | } 44 | 45 | return null; 46 | } 47 | 48 | @Override 49 | public String toString() { 50 | return value; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /citydb-util/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':citydb-database') 3 | api project(':citydb-model') 4 | api 'org.apache.commons:commons-csv:1.13.0' 5 | implementation project(':citydb-config') 6 | } -------------------------------------------------------------------------------- /citydb-util/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module org.citydb.util { 2 | requires org.citydb.config; 3 | requires transitive org.citydb.database; 4 | requires transitive org.citydb.model; 5 | requires transitive org.apache.commons.csv; 6 | 7 | exports org.citydb.util.csv; 8 | exports org.citydb.util.tiling; 9 | exports org.citydb.util.tiling.options; 10 | } -------------------------------------------------------------------------------- /citydb-util/src/main/java/org/citydb/util/csv/IdListException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.util.csv; 23 | 24 | public class IdListException extends Exception { 25 | 26 | public IdListException() { 27 | } 28 | 29 | public IdListException(String message) { 30 | super(message); 31 | } 32 | 33 | public IdListException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public IdListException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /citydb-util/src/main/java/org/citydb/util/tiling/TilingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * citydb-tool - Command-line tool for the 3D City Database 3 | * https://www.3dcitydb.org/ 4 | * 5 | * Copyright 2022-2025 6 | * virtualcitysystems GmbH, Germany 7 | * https://vc.systems/ 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | package org.citydb.util.tiling; 23 | 24 | public class TilingException extends Exception { 25 | 26 | public TilingException() { 27 | } 28 | 29 | public TilingException(String message) { 30 | super(message); 31 | } 32 | 33 | public TilingException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public TilingException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3dcitydb/citydb-tool/2fa660fe8c5f95212cdc7a28551fd428853413f6/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /properties.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | date = new Date() 3 | 4 | citydbName = '3D City Database' 5 | citydbShortName = '3DCityDB' 6 | 7 | appName = 'citydb-tool' 8 | appCliCommand = 'citydb' 9 | appDescription = 'Command-line tool for the 3D City Database' 10 | appWebsiteUrl = 'https://github.com/3dcitydb' 11 | appGitHubUrl = 'https://github.com/3dcitydb/citydb-tool' 12 | appGitConnection = appGitHubUrl + '.git' 13 | appIssueTrackerUrl = 'https://github.com/3dcitydb/citydb-tool/issues' 14 | appCopyrightYear = '2022-' + date.format('yyyy') 15 | 16 | vendorName = 'virtualcitysystems GmbH' 17 | vendorCountry = 'Germany' 18 | vendorWebsiteUrl = 'https://vc.systems' 19 | } -------------------------------------------------------------------------------- /resources/javadoc/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

5 | This document is the API specification for @name@ @version@.
6 | @name@ is part of the @appName@ software. 7 |

8 | 9 | -------------------------------------------------------------------------------- /resources/license/LICENSE.txt: -------------------------------------------------------------------------------- 1 | @name@ is free software. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this software except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /resources/samples/datasets/railway_scene_lod3_v2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3dcitydb/citydb-tool/2fa660fe8c5f95212cdc7a28551fd428853413f6/resources/samples/datasets/railway_scene_lod3_v2.zip -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.gradle.toolchains.foojay-resolver-convention' version '0.9.0' 3 | } 4 | rootProject.name = 'citydb-tool' 5 | include 'citydb-cli' 6 | include 'citydb-config' 7 | include 'citydb-core' 8 | include 'citydb-database' 9 | include 'citydb-database-postgres' 10 | include 'citydb-io' 11 | include 'citydb-io-citygml' 12 | include 'citydb-logging' 13 | include 'citydb-model' 14 | include 'citydb-operation' 15 | include 'citydb-plugin' 16 | include 'citydb-query' 17 | include 'citydb-util' --------------------------------------------------------------------------------