Solved

Shp attributes as input to raster mosaicker

  • 3 October 2017
  • 4 replies
  • 3 views

Badge

I have a shp of a tile grid and a folder than contains thousands of tif's. Each grid square in the shp has an attribute that contains the name of it's corresponding tif. How can I use this attribute to only select it's corresponding tif in the folder to either:

1. copy the tif to a new folder (file copy writer)

or

2. use as input to the raster mosaicker

I can concatenate a string to build up the full path of the tif in the folder. Do I pass this list to what?

icon

Best answer by jdh 4 October 2017, 21:11

View original

4 replies

Badge

Hi @mddown

if you can concatenate the full TIFF file name you can then:

  • pass it to FeatureReader as Dataset parameter value to read the required source TIFF OR
  • add filecopy_source_dataset attribute to the Shape feature and pass it to File Copy Writer to make a copy of the file (NB: File Copy Writer also understands filecopy_dest_filename) OR
  • add RasterMosaicker after the FeatureReader to mosaic the rasters.
Badge

Hi @mddown

if you can concatenate the full TIFF file name you can then:

  • pass it to FeatureReader as Dataset parameter value to read the required source TIFF OR
  • add filecopy_source_dataset attribute to the Shape feature and pass it to File Copy Writer to make a copy of the file (NB: File Copy Writer also understands filecopy_dest_filename) OR
  • add RasterMosaicker after the FeatureReader to mosaic the rasters.
If I pass it to a FeatureReader could that handle multiple tiff's or just 1 tiff?

 

 

Badge

@LenaAtSafe

If I pass it to a FeatureReader could that handle multiple tiff's or just 1 tiff? I've only been able to get it working with 1 tif.

Badge +22

Set the Dataset parameter of the FeatureReader to an attribute containing the full path of the tif to read in.

 

Set your Output port to Single Output

This will work with multiple tiffs.

Although theoretically the tif or geotiff would have a specific feature type and corresponding output port, the interface is a little quirky when you point the dataset to an attribute instead of hardcoding, and it's generally easier to just use the generic port, particularly for rasters which don't tend to have attributes.

Reply