FME Version
Files
-
- 80 KB
- Download
Introduction
ECW files or Enhanced Compressed Wavelets are compressed image files specializing in satellite or aerial imagery. ECW is a lossy compression which is also known as irreversible compression, which means that during compression, some of the image is discarded to greatly reduce file size.
FME can read and write .ECW files, using the ER Mapper ECW Reader/Writer. For more in-depth information about the ER Mapper ECW Reader/Writer please visit the documentation.
In this example, we will mosaic four orthophotos together of Queen Elizabeth Park in Vancouver, BC. The orthophotos also contain the surrounding area which we are not interested in. Using the Clipper transformer and a shapefile containing park boundaries, we will clip the mosaicked orthophoto and output just the park into a GeoTIFF.
Step-by-step Instructions
1. Add an ER Mapper ECW reader to a blank workspace
In a blank FME workspace, add an ER Mapper ECW Reader and add all four of the .ecw datasets (BCVAN15_O17.ecw, BCVAN15_P17.ecw, BCVAN15_O18.ecw, BCVAN15_P18.ecw). Set the Coordinate System to UTM83-10 and click ok to add the reader.
Add a ER Mapper ECW Reader and add the four orthophotos
In the parameters, change Feature Type Name(s) to From File Name(s), so we can distinguish which feature type is which.
Setting Feature Type Name(s)
2. Mosaic the orthophotos together
Add a RasterMosaicker transformer to the workspace and connect all four BCVAN15 feature types. We will just use the default parameters for this example.
Connect the RasterMosaicker to the four orthophotos
3. Add the polygon shapefile
We will need to define a boundary to clip our rasters to. To do this, add a Shapefile writer and browse to the parks_polygon.shp.
4. Test for Queen Elizabeth Park
Our orthophotos are of Queen Elizabeth Park in Vancouver, to find the correct parks polygon for the park we can use the Tester transformer. Add a Tester to the canvas and connect it to the parks_polygon reader. In the Tester parameters set the Left Value to PARK_NAME, the operator to = and the Right Value to Queen Elizabeth Park (remember the tester is case sensitive).
Test for Queen Elizabeth Park
5. Clip the mosaicked orthophotos to the park polygon
Using the Clipper transformer, connect the Clipper Input port to Passed output port on the Tester and the Clippee Input port to the Output port on the RasterMosaicker. In the parameters change the Clipper Type to Single Clipper
6. Write to GeoTIFF
Add a GeoTIFF Writer to the canvas and select a location to save the file to. Set the Raster File Definition to Automatic. In the Feature Type Window, set the Raster File Name to QueenElizabethPark and click ok.
GeoTIFF Writer with Raster File Definition set to Automatic
ECW to GeoTIFF workspace
7. Run the translation and view the output
Run the translation and view the output file in an image viewer. You can also view the image using the Data Inspector and can configure a background map to ensure that your image is georeferenced.
Output GeoTIFF viewed in an image viewer
Data Attribution
The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.
Comments
0 comments
Please sign in to leave a comment.