Missing spatial reference system (srsName) and no source SRS given (--source-srs)

Hi Cesium Community,

May I know how to solve this error?

Error: Invalid File
Filepath: C:\Cesium2\bin\Data_LOD\LOD2\M59TBBB7\UPI_10089200050385.S.0B.M1.D2.gml
Details: Missing spatial reference system (srsName) and no source SRS given (–source-srs).

If I need to specify the srs, how to I write it command line to run transformation from CityGML to 3D Tiles?

Thanks,
Saharil

Can you share how the SRS is listed in the CityGML file?

Hey @Shehzan_Mohammed ,

We downloaded a CityGML file for Florida from opencitymodels. To clip the CityGML file with respect to a bounding box, we imported the file into 3D City Importer Exporter, gave in the coordinates for the bounding box and created a clipped CityGML file.

However, when we upload the clipped CityGML file onto Ion, we get the following error.
image

This is top of the clipped CityGML file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Written by 3D City Database Importer/Exporter, version "4.3.0" -->
<!-- Chair of Geoinformatics, Technical University of Munich -->
<CityModel xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:wtr="http://www.opengis.net/citygml/waterbody/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns="http://www.opengis.net/citygml/2.0" xmlns:veg="http://www.opengis.net/citygml/vegetation/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:tran="http://www.opengis.net/citygml/transportation/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/2.0" xmlns:tun="http://www.opengis.net/citygml/tunnel/2.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/2.0" xmlns:brid="http://www.opengis.net/citygml/bridge/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:luse="http://www.opengis.net/citygml/landuse/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd">
  <cityObjectMember>
    <bldg:Building gml:id="NzZWWDZSN0YrOjE2Mjk2MTkwNQ">
      <gml:boundedBy>
        <gml:Envelope srsName="EPSG:4979" srsDimension="3">
          <gml:lowerCorner>-80.1757274 27.2134622 0.0</gml:lowerCorner>
          <gml:upperCorner>-80.1756599 27.2135197 3.87</gml:upperCorner>
        </gml:Envelope>
      </gml:boundedBy>
....

Hi Saharil

On first look it looks like the SRS should have been accepted. Would you mind sharing the asset ID with me to take a look at the data?

Sure, here is the asset ID, 1254881

Hey, seeing the same issue here was there anything coming from this?

Here is the top of my uploaded CityGML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Written by VC Database Importer/Exporter, version "5.0.2" -->
<!-- virtualcitysystems GmbH, https://vc.systems -->
<CityModel xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:wtr="http://www.opengis.net/citygml/waterbody/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns="http://www.opengis.net/citygml/2.0" xmlns:veg="http://www.opengis.net/citygml/vegetation/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:tran="http://www.opengis.net/citygml/transportation/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/2.0" xmlns:tun="http://www.opengis.net/citygml/tunnel/2.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/2.0" xmlns:brid="http://www.opengis.net/citygml/bridge/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:luse="http://www.opengis.net/citygml/landuse/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd">
  <cityObjectMember>
    <bldg:Building gml:id="BLDG_0003000e0096b7cd">
      <gml:boundedBy>
        <gml:Envelope srsName="urn:ogc:def:crs:EPSG::25833" srsDimension="3">
          <gml:lowerCorner>393333.638499404 5819359.92163321 34.5499992370605</gml:lowerCorner>
          <gml:upperCorner>393353.306764407 5819377.4034985 57.8410631087334</gml:upperCorner>
        </gml:Envelope>
      </gml:boundedBy>

Hi Cesium Team,

Any solution on this issue? I still cannot solve and still cannot make conversion on my data.
Appreciate if you can solve my problem.

Thanks,
Saharil

Hi @virtualcitymatt - Can you share the Asset ID for this upload?

Sure: Asset ID is: 1378010
Note: I tried again, chaging the srsName to “EPSG:25833” instead of what is above but with the same result.

When I run gdalsrsinfo on OSGeo4W, the SRS is valid.

I’m wondering if the version of GDAL / proj used for the coordinate conversions in the pipeline are not recognizing it. Let me check with our team to get more info.

@virtualcitymatt I have a temporary workaround you may want to try. I think the issue is that the SRS is on the CityObject level rather than CityModel (even though all CityObjects have the same SRS). The workaround is to add a SRS/Bounding tag under the CityModel level like this:

<CityModel xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:wtr="http://www.opengis.net/citygml/waterbody/2.0" xmlns:app="http://www.opengis.net/citygml/appearance/2.0" xmlns="http://www.opengis.net/citygml/2.0" xmlns:veg="http://www.opengis.net/citygml/vegetation/2.0" xmlns:dem="http://www.opengis.net/citygml/relief/2.0" xmlns:tran="http://www.opengis.net/citygml/transportation/2.0" xmlns:bldg="http://www.opengis.net/citygml/building/2.0" xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/2.0" xmlns:tun="http://www.opengis.net/citygml/tunnel/2.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/2.0" xmlns:brid="http://www.opengis.net/citygml/bridge/2.0" xmlns:gen="http://www.opengis.net/citygml/generics/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:luse="http://www.opengis.net/citygml/landuse/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd">
	<gml:boundedBy>
		<gml:Envelope srsName="EPSG:25833" srsDimension="3">
			<gml:lowerCorner>391989.364252838 5820055.83456759 32.2299995422363</gml:lowerCorner>
			<gml:upperCorner>392572.547813921 5820800.868 404.924915607822</gml:upperCorner>
		</gml:Envelope>
	</gml:boundedBy>
  <cityObjectMember>
    <bldg:Building gml:id="BLDG_0003000e0096b7cd">

This also works with urn:ogc:def:crs:EPSG::25833 as the srsName.

Right OK - I suspected it was something like this, thanks for confirming - just be aware that CityGML files can have features with differing coordinate systems - I assume that whatever is being used to determine the coordinate system here just looks in the CityModel element. I think this was perhaps common or standard practice for CityGML 1.0.
The open source CityGML Database exporting tool by default does not include an envelope in the CityModel element for performance reasons. As a lot of CityGML users use this database and because CityGML is often provided/hosted for interchange it’s worth having srsName check enhanced to support this.
Thanks for the great support

@virtualcitymatt Yes, I agree that the file as uploaded is compliant with the CityGML spec. Given the various options in CityGML to provide the information, there are always multiple ways to do the same thing.

I’ve open an issue on our end to ensure that we can support the files without needing a top-level bounding SRS.

1 Like