Solved

Pick the right sat image to fit the vector

  • 17 October 2017
  • 8 replies
  • 1 view

Badge +10

Hello ,

we have more than 300 Geotiff image in a folder we need to pick the right one that fit a polygon we have in shapefile , is there any way we could do that with FME

Thanks

icon

Best answer by boubcher 19 October 2017, 11:18

View original

8 replies

Userlevel 4
Badge +30

Hi @boubcher,

You can create a bounding box in all Geotiff and make the spatial relator with your polygon shapefile:

. SpatialRelator

. AreaonAreaOverlayer

Thanks,

Danilo

Badge +22

What I usually do is create a vector index of the footprints of my raster images that contains the path to the image as an attribute.

Then the process is to identify the footprints required, either by reading the entire index in and using a spatialFilter/spatialRelator with the area of interest polygon, or having the AOI polygon trigger a featureReader with a spatial constraint of intersects.

 

Either way, the index polygons that pass are then sent to a FeatureReader with the dataset parameter pointing to the attribute containing the path to the raster image.
Badge +10

@jdh

by vector index you meen we have to extract from each sat image the bound box, then compare this to the Polygone

if that the case is there why we could extract at once bounding for each image at once , because we do have more then 400 geotiff

Userlevel 4

What I usually do is create a vector index of the footprints of my raster images that contains the path to the image as an attribute.

Then the process is to identify the footprints required, either by reading the entire index in and using a spatialFilter/spatialRelator with the area of interest polygon, or having the AOI polygon trigger a featureReader with a spatial constraint of intersects.

 

Either way, the index polygons that pass are then sent to a FeatureReader with the dataset parameter pointing to the attribute containing the path to the raster image.
Agree, this is what I'd do as well.
Userlevel 4

@jdh

by vector index you meen we have to extract from each sat image the bound box, then compare this to the Polygone

if that the case is there why we could extract at once bounding for each image at once , because we do have more then 400 geotiff

Create a separate workspace that reads the 400 GeoTIFF files, use the BoundingBoxReplacer and save the resulting polygons to a vektor dataset "catalog" together with the GeoTIFF filename. You can re-run this workspace every time the GeoTIFF changes.

 

 

In a another workspace, you read your shape polygon and you intersect it with your "catalog" polygons, this will give you the name of each GeoTIFF file that is touched by your shape poylgon. You can then use this filename in a FeatureReader, for example.

 

Badge +22

@jdh

by vector index you meen we have to extract from each sat image the bound box, then compare this to the Polygone

if that the case is there why we could extract at once bounding for each image at once , because we do have more then 400 geotiff

You do it once, or as often as the images change, and write it to a vector dataset (I'm old school enough that shapefile is my default format for these things).

 

 

 

Badge +22

@jdh

by vector index you meen we have to extract from each sat image the bound box, then compare this to the Polygone

if that the case is there why we could extract at once bounding for each image at once , because we do have more then 400 geotiff

Here's an older workspace that indexes all the tif images in a directory.

 

indextif.fmw

 

 

Badge +10

Thanks , Guys

works good

Reply