Question

A faster/better way to calculate raster values that fall within polygons - ie Basic GIS but mixing raster and vector

  • 30 January 2018
  • 3 replies
  • 12 views

Badge

@takashi I have a number of numeric raster datasets with the value of NDVI or vegetation type. I have a polygon dataset with various properties and property types (public, road, private, etc). First I tried the standard raster and vector tools in FME but found that compared to other programs I have used FME is very slow with images. So I got sidetracked into point clouds and FME was on steroids. Then I kinda ran out of tools and knowledge and also realised that the final output would have to include vectors not just the analysis so I will probably bite the bullet and revert to slow and traditional. I would like to continue to see what I could do with point cloud though. Fail points were 1. converting the point cloud into vectors - I did see some workflows of buffering the points, dissolving etc but ran out of time to play and wasn't sure how quick these would be. A brief play with HullReplacer just gave me a big square. 2. Analysing the point cloud against vectors (assuming I didn't convert to poygons) - PointOnAreaOverlayer required I convert the point cloud to points (another time hit but still relatively quick) and 3. Getting out the analysis - despite the relatively good documentation on the PointOnAreaOverlayer I still struggled to work out the ListExploder workflow to actually view/publish a result.

Some comments on using point cloud, directions to explore and pointers would be great. Keep it simple, I'm not a power user by any means.


3 replies

Userlevel 2
Badge +17

Hi @garethgis, I think it's a good choice to use point cloud technology here. However, in general, the PointCloudCoercer (and the RasterCellCoercer) could be a bottle-neck of the performance, since it generates large number of features. The transformer would spoil the advantages of using the point cloud technology, so it would be better to avoid using the transformer if you could.

If you don't need to create individual points finally, you can clip the point cloud by the polygons directly with a Clipper, and then calculate statistics values with the PointCloudStatisticsCalculator for each clipped point cloud. I expect that it would be much faster than using PointCloudCoercer + PointOnAreaOverlayer.

Badge

Hi @garethgis, I think it's a good choice to use point cloud technology here. However, in general, the PointCloudCoercer (and the RasterCellCoercer) could be a bottle-neck of the performance, since it generates large number of features. The transformer would spoil the advantages of using the point cloud technology, so it would be better to avoid using the transformer if you could.

If you don't need to create individual points finally, you can clip the point cloud by the polygons directly with a Clipper, and then calculate statistics values with the PointCloudStatisticsCalculator for each clipped point cloud. I expect that it would be much faster than using PointCloudCoercer + PointOnAreaOverlayer.

Thanks Takashi - I'll have a play along those lines as time permits.

 

 

Hi @garethgis, I'm currently doing something similar so maybe my input will be useful. I'm extracting polygons out of WV2 images and applying attributes like NDVI, EVI, etc.

 

It's a learning curve for me but I did test both raster and PC transformers and my observations are.

 

To a certain size PC approach works much faster (I was converting Raster to PC and doing all operations on PC), if you are talking about BIG rasters, I'm working on 5band, 50cm res. raster, Raster approach works better. It takes time to read the raster but than onward isn't that bad.

 

On tested area 90k polygons, 13GB raster, PC approach took roughly 1h, raster approach 30min.

Workflow for attribution part looks like this, I'm reading the raster, select needed bands for each index, calculate index with RasterExpressionEvaluator, combine all indexes in to new raster, clip it against polygons, PointCloudCombiner grouped by poly_id, PointCloudStatisticsCalculator, FeatureMerger back to original polygon as attribute.

Hope this helps and maybe you have any opinion on my approach. If needed I can share prnscr of my workflow.

Reply