Hi @robbie_botha, the Clipper should work on clipping a raster by area(s).
Firstly inspect the raster and the clipper area with FME Data Inspector, to make sure that they have an identical coordinate system and also overlap each other geographically.
Hi @robbie_botha, the Clipper should work on clipping a raster by area(s).
Firstly inspect the raster and the clipper area with FME Data Inspector, to make sure that they have an identical coordinate system and also overlap each other geographically.
[Addition] If the WMS dataset doesn't have coordinate system definition, you will have to perform georeferencing before clipping. Have a look at the RasterGeoreferencer transformer.
Hi @takashi,
I had a look and spatially the overlap each other perfectly, no issues there.
I did however see that the moment I try to clip it, FME gives me this error message:
PNGRASTER writer: Invalid raster dimensions: 0 rows by 1 columns. Rasters can only be written if they have positive values for both rows and columns. This raster will not be written
Any idea what this could mean? To be clear my WMS is a globe sized layer, and what I'm trying to clip is basically a small town. So technically, it is quite a small fraction of the WMS, but visually looking at it there is plenty of WMS data in my polygon extent when I inspect it.
Hi @takashi,
I had a look and spatially the overlap each other perfectly, no issues there.
I did however see that the moment I try to clip it, FME gives me this error message:
PNGRASTER writer: Invalid raster dimensions: 0 rows by 1 columns. Rasters can only be written if they have positive values for both rows and columns. This raster will not be written
Any idea what this could mean? To be clear my WMS is a globe sized layer, and what I'm trying to clip is basically a small town. So technically, it is quite a small fraction of the WMS, but visually looking at it there is plenty of WMS data in my polygon extent when I inspect it.
There could be an invalid raster with no rows has been generated by the Clipper. You can use the RasterPropertyExtractor to extract raster properties including the number of rows/columns and check if the properties are valid.
There could be an invalid raster with no rows has been generated by the Clipper. You can use the RasterPropertyExtractor to extract raster properties including the number of rows/columns and check if the properties are valid.
Hi @takashi,
Thanks for the advice, I'm learning so many new things :)
Based on the info from the RasterPropertyExtractor, I can see that before the clipper the rows are 256 and columns 512. After the clipper it is 0 by 1.
This leads me to believe the issue is with the reader..? Technically speaking, 256x512 is very tiny, it is just a fully zoomed out view of the layer. I also noticed that if I load the layer into Inspector, zooming does not work, it just stretches the image. In ArcMap for example, I can load in the layer and the data loads based on my view extent, where zooming gives more detail.
Any idea how to work around this? Perhaps I need to adjust something in the parameters when I load in the layer?
Thanks in advance,
Hi @takashi,
Thanks for the advice, I'm learning so many new things :)
Based on the info from the RasterPropertyExtractor, I can see that before the clipper the rows are 256 and columns 512. After the clipper it is 0 by 1.
This leads me to believe the issue is with the reader..? Technically speaking, 256x512 is very tiny, it is just a fully zoomed out view of the layer. I also noticed that if I load the layer into Inspector, zooming does not work, it just stretches the image. In ArcMap for example, I can load in the layer and the data loads based on my view extent, where zooming gives more detail.
Any idea how to work around this? Perhaps I need to adjust something in the parameters when I load in the layer?
Thanks in advance,
Hi @robbie_botha, Looking at the documentation of the
WMS reader, it appears if you specify the Map Width and Map Height parameters to larger number of pixels appropriate for the zoom level you need, that might help the situation. Can you please give that a try?
Hi @takashi and @XiaomengAtSafe,
Sorry for not accepting this answer earlier, I got a little distracted.
The clipper did indeed work, I just had some incorrect transformer links in my workspace.
Best regards,