Skip to main content

When I use the GeoMetry Replacer on features, I can write GeoGSON. But the GeometryReplacer does not understand a raster. What transformer should I use to convert the footprint of the Raster to a rectangular polygon. I also don't want to lose the orignal geometry, since what I want to do is store both the GeoJSON and the WKB geometry into a PostGIS database.

GeoJSON does not support raster geometry. No geometry will be written for features with raster geometry

The BoundingBoxReplacer works on raster too.

So using that transformer will replace the raster by a polygon (rectangle).

You can write that rectangle to GeoJSON.


...and to store the raster away on the same feature without destroying it with the BoundingBoxReplacer add the RasterExtractor before the BoundingBoxReplacer and then when you've finished with the new bounding box, use the RasterReplacer to bring back the original geometry back from the stored attribute.


Reply