Skip to main content

Hey,

I'm using a CityGML-Writer but unfortunately I have some Issues with the correct xsi:schemaLocation. I tried different versions, but nothing worked. So for example I used http://schemas.opengis.net/citygml/profiles/base/2.0/CityGML.xsd

but I received an error:

 

2019-07-02 22:52:43| 3.0| 0.0|INFORM|The uri-map document 'C:\\Program Files\\FME\\xml\\urimap\\gml_citygml.xml' is being used to map from URI to URI

2019-07-02 22:52:43| 3.0| 0.0|INFORM|A <schemaLocation> in the uri-map is overriding the namespace 'http://www.w3.org/1999/xlink' xsd location from '../xlink/xlinks.xsd' to 'xlink.xsd'

2019-07-02 22:52:43| 3.0| 0.1|FATAL |XML Validation: Fatal Error in 'C:\\Users\\Alex\\Desktop\\IfcTestGeometrie.gml' on line 2, column 1309: 'schemaLocation does not contain namespace-location pairs'

2019-07-02 22:52:43| 3.0| 0.0|INFORM|XML Validation: '0' warning(s) found.

2019-07-02 22:52:43| 3.0| 0.0|ERROR |XML Validation: '1' fatal error(s) and '0' error(s) in 'C:\\Users\\Alex\\Desktop\\IfcTestGeometrie.gml'

2019-07-02 22:52:43| 3.1| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

2019-07-02 22:52:43| 3.1| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

2019-07-02 22:52:43| 3.1| 0.0|INFORM|Translation FAILED with 3 error(s) and 0 warning(s) (7 feature(s) output)

 

Can someone tell me how to correctly set the psi:schemaLocation?

 

best regards and thanks in advance

Alex

Have you tried the CityGML writer without the schemaLocation setting - Is there a reason why you need to set it and not accept the default? What version of FME are you using?

I believe that the old default schema location changed since citygml.org went offline and so was taken over by the OGC (opengis.net), so older versions of FME may require setting the correct URL. If you can upgrade to FME 2019.0 or higher then the default CityGML writer settings should work fine.


Hey @deanatsafe,

if I don't use the schemaLocation, the document doesn't validate and I get an error when importing the file into the 3DCityDB. I already use FME 2019.0.


Hi @ahotschek

I'm attaching a basic CityGML writer test which shows that FME can generate valid v 2.0 CityGML without setting any schema location - note the 'Validate=Yes' setting.

One difference between my writer configuration and yours might be the use of the core namespace. I have the parameter 'use core namespace prefix' set to yes. This makes the core citygml namespace explicit. Otherwise you probably do need to set the schema location since the core elements won't have a namespace prefix.

If you still need to set the schema location, make sure you do it using a URI URL namespace pair (URI <space> URL). From the above error it looks like you were only setting the URL, not the URI. A valid schema location setting could be:

http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd

Give either of these a try with your workspace. If you still have problems, please send me your workspace, log, sample input / output and I'll take a look.

creatorcitygmltest.zip


Hi @ahotschek

I'm attaching a basic CityGML writer test which shows that FME can generate valid v 2.0 CityGML without setting any schema location - note the 'Validate=Yes' setting.

One difference between my writer configuration and yours might be the use of the core namespace. I have the parameter 'use core namespace prefix' set to yes. This makes the core citygml namespace explicit. Otherwise you probably do need to set the schema location since the core elements won't have a namespace prefix.

If you still need to set the schema location, make sure you do it using a URI URL namespace pair (URI <space> URL). From the above error it looks like you were only setting the URL, not the URI. A valid schema location setting could be:

http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd

Give either of these a try with your workspace. If you still have problems, please send me your workspace, log, sample input / output and I'll take a look.

creatorcitygmltest.zip

Hey @deanatsafe,

 

thanks for the respond. With these settings the file validates in FME, but for example if I use Netbeans, it won't validate. If I validate it in the 3DCityDB, it works, so I guess it'll be fine. Thanks.

 

But now I have a new problem with the Geometries. I already transformed my data geometry without any problem, but since the weekend, suddenly I can't load my new created CityGML-file in the Data Inspector, but I didn't change anything. 

I attach the error, that is shown in the Log of the Data Inspector.error.txt

I tried various combinations of transformers and I found out, that when I use a GeometryRefiner the error occurs. I'm not sure if there's something wrong with the Data Inspector or with my CityGML-Data. I can import the file in the 3DCityDB and everything works fine.

If I don't use this transformer, the Error doesn't occur and I can load the CityGML-file in the Data Inspector without any problems, but then my CityGML-file contains MultiGeometries, which lead to problems when importing the file to the 3DCityDB.

Do you kown where the problem could be? Or how I could change the MultiGeometries without using the GeometryRefiner?

Unfortunately I can't share the data with you.

 

Thanks in advance 

Alex

 


Reply