Question

How can I get absolute world coordinates out of a implicit geometry citygml file?

  • 13 March 2021
  • 4 replies
  • 2 views

I have vegetation data of a city, but it is given in implicit geometry and when I open the converted shp file of it, it has no spatial extention.

I was told it should be possible to transform the file in FME and to multiply the matrix with the reference point. I tried using transformers of FME like coordinateExtractor and Coordinate system setter but it didn't work and I honestly don't really know what I am doing.

Appreaciate any tips and instructions!


4 replies

Userlevel 2
Badge +17

Hi @sccandy​ ,

Using FME to convert the CityGML data to a format that doesn't support matrices (ie. Shape) will cause them to be applied to the output coordinates when writing. If there is a coordinate system set in the CityGML data, it will also be written to the Shape file PRJ. If the coordinate system is not set in the CityGML data, you can set in the FME CityGML reader parameters.

If you need to apply the matrix within a workspace, the CsmapReprojector will do this during any reprojection.

Hello Dave,

thank you for your answer!

 

I could set the coordinate system in the reader easily, and when I look at the data in FME, there is a geometry and I can see the points (trees) on the map. However, when exporting the file to shape, the files always add "no_geom" in their name. I think this is because the citygml file uses an implicit geometry and therefore relative coordinates, because the trees are modeled through a reference point and a transformation matrix. So the file has a coordinate system set but the extention of the file equals just the reference point.

I was told I would need the X (and Y, and Z) coordinate of the reference point to be multiplied by the transformation matrix and saved as a new X, Y, Z coordinate for each tree. When I view the source data, there are already the X, Y, and Z values of the features. I don't understand why they are not used for the location of the trees when exporting the file to a shapefile..?

 

Here is some example data: https://www.dropbox.com/s/w32kjt4ldrk8ym8/vege.gml?dl=0

 

Userlevel 2
Badge +17

Hi @sccandy​ ,

Please try the attached workspace I generated in FME 2020. It will create a multi-patch Shape file from the vegetation.

Hi @sccandy​ ,

Please try the attached workspace I generated in FME 2020. It will create a multi-patch Shape file from the vegetation.

Thank you so much, Dave! It works :)

Reply