Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New format: CityGML 1.0 #60

Open
marhop opened this issue May 29, 2024 · 1 comment
Open

New format: CityGML 1.0 #60

marhop opened this issue May 29, 2024 · 1 comment
Assignees

Comments

@marhop
Copy link
Contributor

marhop commented May 29, 2024

Format name

CityGML

Version number

1.0

PUID

N/A

Extensions

Usually gml or maybe xml

MIME/Media Type

N/A, as far as I know, but the MIME type of regular GML (application/gml+xml) might be used.

Description

CityGML (City Geography Markup Language) defines a data model and XML-based exchange format for the representation of 3D city and landscape models. It is implemented as a GML application schema, a specialization of the Geography Markup Language.

CityGML 1.0 is specified in: Gröger, Gerhard, et al. OpenGIS City Geography Markup Language (CityGML) Encoding Standard. OGC 08-007r1, Open Geospatial Consortium, 20 Aug. 2008, https://web.archive.org/web/20240524220835/https://portal.ogc.org/files/?artifact_id=28802.

See also https://www.ogc.org/standard/citygml/.

Format type

GIS, Text (Mark-up)

Vendor

Open Geospatial Consortium

CityGML was originally developed by the Special Interest Group 3D of the initiative Geodata Infrastructure North-Rhine Westphalia (GDI NRW).

File format identification signatures

At offset 0 from BOF:

  1. XML declaration <?xml version="1.0" (alternatively with single quotes), followed by up to 320 arbitrary bytes (rest of XML declaration + possible whitespace, comments etc.).
  2. CityGML root element, CityModel, preceded by either an angle bracket < or a colon : (it's usually preceded by a namespace prefix and a colon, but might be used without a prefix, hence the bracket). This may be followed by a varying amount of arbitrary bytes (declarations of other namespaces than CityGML, other attributes, ...); let's say up to 1024 bytes since often there are a lot of namespaces involved.
  3. CityGML namespace declaration xmlns + up to 8 bytes + ="http://www.opengis.net/citygml/1.0" (alternatively surrounded by single quotes). The 8 bytes are a placeholder for the namespace prefix which may be pretty much any string chosen by the author of a given CityGML XML file, but is usually reasonably short (and if someone actually wants to use :citygml this fits neatly into 8 bytes).

To summarize:

3C3F786D6C2076657273696F6E3D(22|27)312E30(22|27){0-320}
(3C|3A)436974794D6F64656C{0-1024}
786D6C6E73{0-8}3D(22|27)687474703a2f2f7777772e6f70656e6769732e6e65742f63697479676d6c2f312e30(22|27)

This format should have priority over regular GML (i.e., x-fmt/227 and fmt/1047) because CityGML is based on GML and uses GML elements, so the GML namespace which is used in the GML identification signatures will usually be present in CityGML as well.

Attribution

Landesarchiv Nordrhein-Westfalen

@marhop
Copy link
Contributor Author

marhop commented May 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants