Skip to main content
Question

Convert ECW file boundary to shape file

  • January 5, 2018
  • 7 replies
  • 226 views

Forum|alt.badge.img

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

helmoet
Forum|alt.badge.img+8
  • January 5, 2018

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?


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • January 5, 2018

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.


Forum|alt.badge.img
  • Author
  • January 5, 2018

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.

 

 


Forum|alt.badge.img
  • Author
  • January 5, 2018

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.

 

 

 


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • January 5, 2018

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.


Forum|alt.badge.img
  • Author
  • January 5, 2018

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?

 

 


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • January 5, 2018
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.