Skip to main content

Hi,

I want to clip a large ECW file which is about 2 GB in size. It consist of aerial imagery around a river in my country.

Secondly I have a shapefile which is the river body. Now I want to clip my ECW with this shapefile. See the attached figure as illustration.

I foresee that just clipping the ECW with this shapefile will take a long time. Do you have any advice to speed up this process?

I was thinking about the following:

- Use RasterTiler and create an attribute which will function as a Group By attribute in the clipper. I hope this will make it possible to perform parallel processing within the clipper?

-Use 'Clippers first' and drop my shapefile reader at the top of my readers. I saw this suggestion elsewhere at this forum.

-Not all features in my shapefile overlap with my aerial imagery. Maybe I could filter them before entering the Clipper.

Thanks for you help in advance!

It shouldn't take tooo long with FME. FME will build a spatial index of the raster if there isn't one already.

 

 

Definitely use the Clippers First approach though, however, if you only have one raster then it shouldn't make too much of a difference.

 

 

The problem with using groups like this is the FME will first write out the 'Tiled' raster to disk and then re-read it back in so wouldn't recommend that.

 

 

Raster processes are pretty quick in FME. Just make sure that your Raster and Shapfile are both in the same coordinate system.

 

 

I suspect the reading in and writing out of the data will take the longest in this process.

Give it a go and see what happens - Good luck and let us know the outcome

 

 


Should be fast.

1. Use a FeatureReader (ECW) and send individual "clipping polygons" to this transformer to read only the part you need. You can set the Pyramid Level to Read = 10 when setting up the workspace (for a low res test-image) - when you see the end result is ok - change to blank and use the full resolution.

Important - reproject your clipping polygons to the same coordinate system as the ECW

2. Use a Clipper on the data afterwards if you do not want the bounding box but the actual raster-area

3. Add a FeatureWriter (not a regular writer) to write the parts to files

 


It shouldn't take tooo long with FME. FME will build a spatial index of the raster if there isn't one already.

 

 

Definitely use the Clippers First approach though, however, if you only have one raster then it shouldn't make too much of a difference.

 

 

The problem with using groups like this is the FME will first write out the 'Tiled' raster to disk and then re-read it back in so wouldn't recommend that.

 

 

Raster processes are pretty quick in FME. Just make sure that your Raster and Shapfile are both in the same coordinate system.

 

 

I suspect the reading in and writing out of the data will take the longest in this process.

Give it a go and see what happens - Good luck and let us know the outcome

 

 

Thanks for your reply!

Should be fast.

1. Use a FeatureReader (ECW) and send individual "clipping polygons" to this transformer to read only the part you need. You can set the Pyramid Level to Read = 10 when setting up the workspace (for a low res test-image) - when you see the end result is ok - change to blank and use the full resolution.

Important - reproject your clipping polygons to the same coordinate system as the ECW

2. Use a Clipper on the data afterwards if you do not want the bounding box but the actual raster-area

3. Add a FeatureWriter (not a regular writer) to write the parts to files

 

This approach should work I guess. However, the result until now is not satisfying (Pyramid level 10) . As you can see on the image below the surroundings around the river are still present while I only wanted to keep river itself.

 

 

This workbench I used for processing:

ScheepVaartDetectie_RijntakkenOost2.fmw


This approach should work I guess. However, the result until now is not satisfying (Pyramid level 10) . As you can see on the image below the surroundings around the river are still present while I only wanted to keep river itself.

 

 

This workbench I used for processing:

ScheepVaartDetectie_RijntakkenOost2.fmw

A raster is always rectangle of shape so some of the surrounding will be always present.

If you are using the bounding boxes of the vectors to clip, try using the only the vectors.

Another option to remove the surrounding is to create a mask and set the area outside the mask to no data in your raster (depending if your output format supports it).

hope this helps.


A raster is always rectangle of shape so some of the surrounding will be always present.

If you are using the bounding boxes of the vectors to clip, try using the only the vectors.

Another option to remove the surrounding is to create a mask and set the area outside the mask to no data in your raster (depending if your output format supports it).

hope this helps.

Yeah sure, but in this case almost everything outside my clipping polygon is still there. As you can see in the image in my first message/question. I suppose I am using the vectors of the polygon right. Find attached the settings of my FeatureReader.

 


Reply