Friday 8 June 2018

Overlapping raster with vector data

When overlaying rasters with lines or polygons, don't convert the raster to vector format, but instead convert the line or polygon dataset to raster.

First use a 3DForcer transformer and set the 'elevation' of your lines or polygons to 1. Then use the NumericRasterizer transformer, setting 0 as the Background Value. This will create a binary raster where the lines or polygons have a raster value of 1, and everything else 0.

Then point this rasterized vector dataset and the original raster both to the RasterExpressionEvaluator transformer, and do Preserve; A[0]*[B0]. This will effectively give an intersection raster.


No comments:

Post a Comment

Combine Raster Bands

To combine multiple single-band rasters into a single multi-band raster, use the RasterBandCombiner transformer. For example, combine the ...