span8
span4
span8
span4
The AustinMosaic_2015.fmwt workspace illustrates how to mosaic imagery and based on an area of interest (aoi),create new raster tiles in a different format from the source (MrSID to GeoTIFF).
The AustinMosaicUpdate_2015.fmwt workspace then builds on this to update the existing tiles with a newer set of imagery.
Note that the following scenario is as close to real life as possible,and as such,it operates with larger raster datasets.
The full set of raster data you'll have to download in order to reproduce this demo is about 330 Mb.
To run the example workspace from this page,download the following:
http://tnris.org/data-download/#!/statewide
It is not necessary to extract the images from the zip files as FME is able to read the MrSID files from the zip,as long as the format is specified correctly.
At the time of writing the Oak Hill and Montopolis Quad`s had to be selected using the Map or typed into the text box manually.
Reproject the aoi to TX83-CF to match the Austin 200' City Grid file.
The aoi boundary and image tiles reprojected to the TX83-CF projection to match the Austin 200' City grid.
Select the Austin 200' City grid tiles covered by the aoi using the SpatialFilter.Those tiles that are intersected by the aoi will be output via the PASSED port,the rest won't participate in further processing.
Austin 200' City Grid tiles with the aoi overlayed
Add an Alpha band to the rasters using the RasterBandAdder and set the cell value to 255.See the article on adding Alpha and transparency here: .This will allow the border to show as transparent rather than black.Mosaic the DOQQ datasets together using the RasterMosaicker transformer,leaving settings to default.
Reproject the mosaic to TX83-CF.This step should be done after mosaicking to avoid matching problems at the edges of the tiles.
Re-tile the mosaic by clipping based on the selected Austin 200' City grid file.In order to give the clipped images the same names as the corresponding City Grid tiles,set "Merge Attributes" to "Yes" on the Clipper.
Note that both the SpatialFilter and the Clipper have a "Filters (or Clippers) first" option.This option speeds up the translation;however it makes the order of readers important.Make sure the filter feature is read first,in this case the MapInfo tab file,the candidate or shapefile second,and the rasters last - this can be done in the navigator pane.
After clipping,the new image tiles are ready to be written to GeoTIFF format.The TILE_NAME attribute is used as the Raster File Name.The output GeoTIFF's will be named according to the original Austin 200' City Grid tile names.
New image tiles with Austin 200' City grid tile names with aoi overlayed
Updated imagery in the aoi will be used to recreate the existing tiles where available.The AustinMosaickUpdate.fmwt uses the following files,along with the raster tiles created with AustinMosaick.fmwt.Bounding boxes of the updated imagery with old below
Updated imagery in color
The RasterBandAdder is used to add an Alpha8 band.The cell value is set to 255 which allows black borders to become transparent and helps to avoid seams in the mosaicking process.
The SpatialFilter is used to select the old raster tiles,covered by the updated imagery,for further processing.In this case,anything coming out of the passed port does not match and will not be part of further processing.Some of the updated tiles will contain both portions of old imagery and newer higher resolution imagery.The old images need to be resampled with the RasterResampler to 1 ft resolution because the first image to hit the RasterMosaicker,defines the spacing of the output raster.If the RasterMosaicker is allowed to do the resampling,the resolution output may be undesirable.
An 'Order' attribute is created using the AttributeCreator and values of 1 and 2 are assigned to both the original and new rasters respectively.This allows the new images to be placed on top of the old ones.
The RasterMosaicker transformer settings are all default except for the 'Composite Using Alpha Band' parameter which is set to 'yes'.When 'Composite Using Alpha Band' is set to 'Yes',rasters will be blended according to the alpha values of the rasters they overlap instead of just being copied over them.
The AttributeRemover transformer removes the fme_basename for the new raster tiles coming in because the naming convention should still be based on the old Austin 200' city grid tile which comes from the old rasters.The bounding box of the old tiles is extracted and the newly updated mosaic is clipped and written out with the proper tile names.
Updated mosaic with new new imagery on top
© 2019 亚搏在线Safe Software Inc |Legal