Skip to main content
Question

I'm trying to use RasterClipOverlay to extract an area on GeoTIFF defined by a polygon. FME is currently giving me the incorrect area.


theandroidbell
Contributor
Forum|alt.badge.img+3

I'm trying to use RasterClipOverlay to extract an area on GeoTIFF defined by a polygon.  FME is currently giving me the incorrect area.  The Workspace:

 

The workspace has a polygon coming from a POSTGIS layer which is filtered. It also has an GeoTIFF  both of which are inputs to the RasterClipOverlay.  The results are output to a GEOTIFF.  As a test I have also added a simple output image that does not come from the RasterClipOverlay. Both the polygon and image are in the same projection EPSG:3395.

The original image (displayed in QGIS):  

 

The polygon (in QGIS):

The results: 
Displayed in QGIS with Open Street Map behind and the polygon overlaid.
​​​​As you see from the results, the area of the map is not correctly extracted.  The polygon is supposed to cut out the sea, however, it also cuts the map boundaries and part of the land. The shape of the cut is correct however the map is “shrunk” hence the area of the map is incorrect. 

This is just one example, I have various other maps I’m working with and the problem occurs in all of them.  If I use QGIS /GDAL then the results are correct, however, I want this to work in FME.

The test output that does not get clipped does display the correct map in the correct location.

 

7 replies

j.botterill
Influencer
Forum|alt.badge.img+34
  • Influencer
  • March 7, 2025

Can you check both  the Geotiff and the PostGIS raster are in the same coordinate system? Maybe also desegregate all the polygons, if there are multi part polygons


theandroidbell
Contributor
Forum|alt.badge.img+3

I have checked the coordinate reference system and both are in the same 3395.  I had included transformers to ensure this but they didn’t make any difference so removed them to keep my model simple as possible.

 

I have since ensure my polygons and not multi and that has not made any difference either.


j.botterill
Influencer
Forum|alt.badge.img+34
  • Influencer
  • March 11, 2025

Out of interest, how are you checking the coordinate system? You should inspect both inputs into the problem transformer, opening the ‘Feature Information’. Please send screenshots of the geometry section of the feature information window


theandroidbell
Contributor
Forum|alt.badge.img+3
j.botterill wrote:

Out of interest, how are you checking the coordinate system? You should inspect both inputs into the problem transformer, opening the ‘Feature Information’. Please send screenshots of the geometry section of the feature information window

 


theandroidbell
Contributor
Forum|alt.badge.img+3
theandroidbell wrote:
j.botterill wrote:

Out of interest, how are you checking the coordinate system? You should inspect both inputs into the problem transformer, opening the ‘Feature Information’. Please send screenshots of the geometry section of the feature information window

 

I have updated the workspace with Coordinate setters to be sure the CRS is used.  However, the end result is the same.  I can confirm that the data is the CRS that I applied with these transformers.  Running SELECT DISTINCT(st_srid(geom) FROM TABLE_NAME on the database returns 3395.  If I inspect the image directly before any transformer it also in WORLD MERCATOR 3395.

  I emphasise the GDAL is correctly handling the same task.


geomancer
Evangelist
Forum|alt.badge.img+46
  • Evangelist
  • March 13, 2025

Is there a reason why you use the FME Hub transformer RasterClipOverlay instead of the official Clipper transformer?


theandroidbell
Contributor
Forum|alt.badge.img+3
geomancer wrote:

Is there a reason why you use the FME Hub transformer RasterClipOverlay instead of the official Clipper transformer?

Thank you, this is probably the solution.  I had forgotten I could use the clipper for raster.   However, how can I use Clipper and ensure the outside area of the image is transparent?  This is something that RasterClipOverlay would do automatically.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings