span8
span4
span8
span4
In this example we read a LOD2 CityGML model of central Rotterdam in the Netherlands and convert it to KML for viewing in Google Earth.By transforming CityGML to KML,we can situate the model on the Earth's surface,and we can easily share it with anyone with Google Earth installed.
In this example,the 3D geometries are converted from solids to surfaces by triangulation and then converted into one large mesh.This is the optimal geometry for writing to KML/COLLADA.The texture appearances are automatically preserved by FME.So if you were to use your own source data that contains textures,the KML you write out will also contain those textures.Viewing the output in Google Earth demonstrates that the model has been read and georeferenced correctly.Note that due to memory limitations,at present this workspace only runs on FME 64bit.
The source data is the CityGML model,Kop_van_zuid.xml,translated as ‘Head of South',and is comprised of a few high rises in central Rotterdam.Note that while the extension is XML,CityGML datasets are comprised of XML files.The data,which includes high-resolution textures,is then reprojected to a local coordinate system of the Netherlands.Only the textured feature typesWallSurfaceandRoofSurfaceare selected as source for this translation.Including the GroundSurface would not improve the output since the KML displays the data in Google Earth.
The most efficient way to store the model without losing any information is to create a single mesh out of all the building features.Before the MeshMerger can merge the features,they need to be disaggregated and triangulated,using theDeaggregatortransformer and theTriangulator.Their triangulated surfaces can then be connected and stored in a single feature.The information of the features' textures is automatically preserved.If you wish to run your workspace at this time,remember to set the ‘Rejected Feature Handling' in the Workspace Parameters to‘Continue Translation',so rejected features do not terminate the translation.
Before the data is written to KML it is reprojected to the LL-WGS84 coordinate system.KML always needs to be written in this projection.Make sure to adjust the advanced writer parameters in order for Google Earth to be able to read the KML file and draw the geometry correctly.In your Navigator,locate the OGCKML Writer,go to Parameters,then Advanced,and adjust the following if they are not already set:
Once written,and opened in Google Earth,it is easy to see that the buildings embedded or referenced within the KML file are accurately georeferenced with respect to Google's satellite imagery.You can also turn on and off Google's buildings layer and compare their buildings with the ones from this exercise.At the time of writing,it appears that some of the buildings are missing or only partially completed since Google's data may be older,though this is likely to change over time as their data is updated.
Select the 3D Buildings layer to compare your KML model with the available satellite imagery from Google Earth.You can consider turning off all the other layers for viewing as we will not be needing them.
© 2019 亚搏在线Safe Software Inc |Legal