Question

Convert ECW file boundary to shape file

  • 5 January 2018
  • 7 replies
  • 19 views

Badge

This should be simple but I am having a brain misfire. I want to read in a large ECW file and create a shape file which follows the raster data snuggly (not including the white, nodata areas). Obviously I need it to run as quickly as it can.


7 replies

Badge +8

Not sure if it addresses your performance request, but maybe a PointCloudCombiner can be used to convert the raster to a pointcloud, a PointCloudFilter to remove the nodata values, and a PointCloudCoercer (Single Multipoint, no attributepreservation) to make it consumable for a final HullReplacer?

Badge +22

The RasterExtentsCoercer does exactly what you want (either MBR or Data Extents mode), but it may not be the most efficient transformer. Make sure the white pixels are set to NoData.

Badge

The RasterExtentsCoercer does exactly what you want (either MBR or Data Extents mode), but it may not be the most efficient transformer. Make sure the white pixels are set to NoData.

Thank you for your answer. I attempted to use the RasterExtentsCoercer but it seems to process my large ECW files sooo slowly. I will check it out again.

 

 

Badge

Not sure if it addresses your performance request, but maybe a PointCloudCombiner can be used to convert the raster to a pointcloud, a PointCloudFilter to remove the nodata values, and a PointCloudCoercer (Single Multipoint, no attributepreservation) to make it consumable for a final HullReplacer?

Thank you for your suggestion helmoet. I hadn't thought about using the PointCloud transformers and I am not very experienced with them but I can certainly take a closer look at these.

 

 

 

Badge +22

In either case you will get better performance if you turn your raster into a binary data/nodata. (Set everything valid value to 1, the white pixels to 0 and then set the NoDataValue to 0).

You could also look at the RasterToPolygonCoercer.

Badge

In either case you will get better performance if you turn your raster into a binary data/nodata. (Set everything valid value to 1, the white pixels to 0 and then set the NoDataValue to 0).

You could also look at the RasterToPolygonCoercer.

jdh. That is an interesting idea which I have never thought of before. Which transformers would you use to achieve that? I would think RasterCellValueReplacer and RasterBandNoDataSetter. Would this be correct?

 

 

Badge +22
jdh. That is an interesting idea which I have never thought of before. Which transformers would you use to achieve that? I would think RasterCellValueReplacer and RasterBandNoDataSetter. Would this be correct?

 

 

Either the RasterCellVallueReplacer or a conditional statement in the RasterExpressionEvaluator depending on your input data. (What happens if you have a pure blue (0,0,255) presumably you don't want it to become (1,1, NoData)

 

See https://knowledge.safe.com/articles/1226/using-conditions-with-the-rasterexpressionevaluato.html

 

 

Then the RasterBandNoDataSetter.

 

 

Reply