Question

Unable to generate the exact footprint through RasterExtentsCoercer

  • 17 January 2022
  • 4 replies
  • 4 views

I can't create the exact footprint through RasterExtentsCoercer, even i have set the Extents Type as 'Data Extents'. The transformer only allow me to generate a rectangle that covers the entire extents.

My aerial imagery is in RGBA, possible the alpha band caused this issue.

Is there a way to create the exact footprint?

PS: i have attached a sample image.

Thanks and Regards,

Jian


4 replies

Userlevel 2
Badge +17

Hi @jiany​ , "Data Extants" means the area of non-Nodata cells. Try setting an appropriate value representing the white area to Nodata for the raster with RasterBandNodataSetter before executing the RasterExtentsCoercer.

Hi @Takashi Iijima​ , I have integrated RasterBandNodataSetter into my workspace and set Nodata Value as 255 (white area). After reading the ecw file, the workspace just keep running for near 2 days to process topological donuts & cycles.

Is there a quick way to clarify the white area (255, 255,255) to Nodata?

Thanks for your help!

Regards, Jian

Userlevel 2
Badge +17

Hi @Takashi Iijima​ , I have integrated RasterBandNodataSetter into my workspace and set Nodata Value as 255 (white area). After reading the ecw file, the workspace just keep running for near 2 days to process topological donuts & cycles.

Is there a quick way to clarify the white area (255, 255,255) to Nodata?

Thanks for your help!

Regards, Jian

I think there could be many discrete cells containing a value 255 for a band in the data area, so it takes so long time to form the complex data area with holes.

How about replacing the 3 band raster into a single band raster with the RasterExpressionEvaluator, setting Noata, then extracting the data area?

Assuming the values of white area are (255, 255, 255),

(1) RasterExpressionEvaluator (Mode: One Raster)

Interpretation | Expression

UInt8 | @if(A[0]==255 && A[1]==255 && A[2]==255, 0, 1) 

(2) RasterBandNodataSetter (Nodata Value: 0)

(3) RasterExtantsCoercer (Extents Type: Data Extents)

Please modify the Expression according to the actual cell values representing white, if necessary.

Hope this helps.

I think there could be many discrete cells containing a value 255 for a band in the data area, so it takes so long time to form the complex data area with holes.

How about replacing the 3 band raster into a single band raster with the RasterExpressionEvaluator, setting Noata, then extracting the data area?

Assuming the values of white area are (255, 255, 255),

(1) RasterExpressionEvaluator (Mode: One Raster)

Interpretation | Expression

UInt8 | @if(A[0]==255 && A[1]==255 && A[2]==255, 0, 1) 

(2) RasterBandNodataSetter (Nodata Value: 0)

(3) RasterExtantsCoercer (Extents Type: Data Extents)

Please modify the Expression according to the actual cell values representing white, if necessary.

Hope this helps.

Hi @Takashi Iijima​  , Thankyou so much for your guidance!!! I have made a big progress. Based on your instructions, i have also added RasterResampler at the beginning and DonutHoleExtractor at the end. The original ecw file is a high resolution aerial imagery which took lots of CPU time. The process speed can be fast improved once cell size increased. There will be also lots of holes created within the footprint at the end, DonutHoleExtractor is the best tool to remove them.  It's so nice see the final extact footprint. I can have a good sleep tonight after nearly one week' brainstorm.

Much appreciate your on-going support!!!👍

Regards, Jian

Reply