span8
span4
span8
span4
FME can write georeferenced raster features directly to a KML (or KMZ) dataset.FME is also able to write a combination of vector and raster features to the same output file.The Google KML writer works with raster features sent to the writer (as opposed to copying the original source) and carries out proper raster reprojection,rather than doing a vector reproject on the raster's bounding box.
The KML format supports raster features and FME is equally able to supply data using that structure.This demo will translate and transform a raster DEM into KML.
In most instances,you will want to write your raster data to a KMZ output file.You do this by simply specifying KMZ as the output extension to use.By default,writing data to a file with a KMZ extension will cause a single KMZ file to be created containing both a header document (doc.kml) and a sub-folder containing the raster image(s).When the file extension is set to KML,then the output is somewhat different.The KML file itself is the header document.It contains pointers to the raster image(s) which are stored in a completely separate folder called images.
TheRaster Handling Modeis an advanced writer parameter found in the Google KML Writer parameters or Navigation Pane in FME Workbench.There are three raster handling modes,Write,Copy and Relative.
Raster data can be regionated,or split into sections,using theGenerate Super-Overlays参数。Regionating data – particularly rasters – can make it easier to control and faster to load in Google Earth.
TheRaster Output Formatparameter allows a user to change the type of raster being written to the KML dataset;the four options are JPEG,TIFF,PNG,or GIF.In general terms,a TIFF output provides better quality,but at the cost of larger file sizes.This parameter has no effect unless the Raster Handling Mode is set to "write".
Opacity in a raster dataset can be set using theKMLPropertySetter.
DEM data,"DEM-Full.dem",is read with the Canadian Digital Elevation Data (CDED) Reader.The data is coordinate system aware,as the Data Inspector tags it as LL83-SECONDS.If you are reading a raster which is not coordinate system aware,it is necessary to specify the coordinate system in the Navigator,or use the CoordinateSystemSetter.
DEM-Full.dem in Data Inspector
1.Change Raster Interpretation
TheRasterInterpretationCoerceris used to alter the destination interpretation type to Gray8,as this is an interpretation which is compatible with the TIFF format,the Raster Output Format is specified in the KML Writer Advanced parameters.Other destination interpretation types may be used,as long as they are compatible with the raster output format specified.
2.Set Raster Opacity
The output raster opacity is set to 70% using theKMLPropertySetter.
Set opacity in the KMLPropertySetter
3.View results in Google Earth
Inspect the output in Google Earth.Please note how the underlying Google Earth background is partly visible under the KML raster.
Elevation.kmz in Google Earth
Data Attribution
Data used in this tutorial originates from open data made available by the Government of Canada.It contains information licensed under theOpen Government Licence - Canada.
© 2019 亚搏在线Safe Software Inc |Legal