EkistikaContact us

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 .gml and one .png file with the same name for each building, for example Bina_01.gml and Bina_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 .gml and .png files are used; everything else is ignored. Rename .xml or .citygml files 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 own srsName attribute and its corners written directly as lowerCorner and upperCorner; bounding boxes written with pos or coordinates aren't accepted.
  • Each corner needs 2 or 3 numbers separated by spaces; both corners must have the same count, and no lowerCorner value may be greater than the matching upperCorner value. Use a dot as the decimal separator (32.85, not 32,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>
ExampleThe values are examples. In EPSG:4326, longitude comes first, then latitude; the third number is the Z value.

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 z corners). 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 GroundSurface polygon with a single exterior LinearRing and no interior rings (holes). Write the ring as one posList or as at least four pos elements; it must be closed (first and last point the same) and contain at least three distinct points. If posList has a count, 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.

Still need help?

Tell us your version, what you were doing and the message you saw; a screenshot helps.