Prepare GML and PNG files for a CityGuide project
The rules CityGuide checks for file names, the GML bounding box, the coordinate system, height and footprint.
A CityGuide project has one CityGML file (.gml) and one texture image (.png) for each building. Before a project is published, the files are checked and converted to 3D Tiles. This article lists the rules your files must follow to pass that check and to show buildings with complete details.
Folder and file names
- Prepare one
.gmland one.pngfile with the same name for each building, for exampleBina_01.gmlandBina_01.png. Matching ignores upper and lower case. - Put the files in one folder. If you use subfolders, each GML and its PNG must be in the same subfolder, and the subfolder name becomes part of the building name.
- Only
.gmland.pngfiles are used; everything else is ignored. Rename.xmlor.citygmlfiles to.gml. - A GML without a PNG, or a PNG without a GML, is skipped; buildings without a texture aren't uploaded. A second GML or PNG with the same name is skipped too. Don't leave empty (0-byte) files.
- The file name without the extension can be up to 200 characters and must be unique in the project; a name that already exists in the project can't be added again. This name appears as the building name in the list and on labels.
The GML bounding box
- The file must be well-formed XML encoded as UTF-8.
- The file needs a bounding box (
Envelope) with its ownsrsNameattribute and its corners written directly aslowerCornerandupperCorner; bounding boxes written withposorcoordinatesaren't accepted. - Each corner needs 2 or 3 numbers separated by spaces; both corners must have the same count, and no
lowerCornervalue may be greater than the matchingupperCornervalue. Use a dot as the decimal separator (32.85, not32,85). - If you include
srsDimension, it must be 2 or 3 and match the number of values in the corners.
<gml:boundedBy>
<gml:Envelope srsName="EPSG:4326" srsDimension="3">
<gml:lowerCorner>32.85410 39.92070 850.0</gml:lowerCorner>
<gml:upperCorner>32.85450 39.92100 874.5</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>Coordinate system
srsName must resolve to an EPSG code. Accepted forms are EPSG:<code>, urn:ogc:def:crs:EPSG::<code> (a version number is allowed), http://www.opengis.net/def/crs/EPSG/0/<code>, …/epsg.xml#<code>, and CRS84 / OGC:CRS84, which are read as EPSG:4326. Local grid names and compound horizontal + vertical systems aren't accepted.
Coordinates are read in the X/Y order written in the file, and the centre of the bounding box is converted to EPSG:4326. If no projection definition is found for the code, or the converted position falls outside the valid longitude/latitude range, the file is rejected.
Height and footprint
- Write the bounding box in 3D (
srsDimension="3",x y zcorners). Without Z values, height, elevations and volume show No data, the building isn't classified in Color by Height, and its base can't be aligned with the terrain. - Z values aren't converted; they are used as written and shown in metres (m).
- For the footprint, width, length, base area and volume, include a
GroundSurfacepolygon with a single exteriorLinearRingand no interior rings (holes). Write the ring as oneposListor as at least fourposelements; it must be closed (first and last point the same) and contain at least three distinct points. IfposListhas acount, it must match the number of points. If there are several usable polygons, the largest one is used. - Keep one building per GML: each GML file is listed as a single building in CityGuide, located at the centre of the file's bounding box.