Solved

Get extent of bounding box from one .tif file for another raster map .tif file

  • 18 July 2019
  • 6 replies
  • 48 views

I have 2 .tif files (1xBounding Box with correct extent and 1xRasterMap image with wrong extent).

Please can someone show me an example (or list of tools) how to import or get the correct extents from a bounding box .gif raster file into another .gif raster file (map) with wrong extents. I've tried BoundsExtrractor, BoundingBoxReplacer, RasterCombiner, ExtentsCoercer & Merger/Georeferencer but can't get what I need! The images below illustrate what I mean. Any help appreciated! Scottaidh

Georeferenced tif

icon

Best answer by jdh 18 July 2019, 20:04

View original

6 replies

Badge +22

I would try something along the lines of

  1. Read in the gif with the correct georeferencing
  2. BoundsExtractor
  3. FeatureReader bad tiff, with merge attributes yes
  4. RasterGeoreferencer (extents mode, with attributes from (2)
  5. CoordinateSystemSetter

 

Thanks for your answer, this helps a bit - almost there!

Thanks for the answer - I tried this but unfortunately I am still getting a black bounding box with no raster image (map) on it or warped over it (screenshot attached). It also seems necessary to input the x y extents manually whereas I am trying to get the xy extents from the bounding box to the raster map automatically. Does anyone have any hints where I'm going wrong?

Badge +22

Thanks for the answer - I tried this but unfortunately I am still getting a black bounding box with no raster image (map) on it or warped over it (screenshot attached). It also seems necessary to input the x y extents manually whereas I am trying to get the xy extents from the bounding box to the raster map automatically. Does anyone have any hints where I'm going wrong?

The featureReader should be attached to the output port of the BoundExtractor, and you need to merge attributes. That way the unreferenced tiff will have access to the attributes containing the georeferencing information from the gif.

Thanks for the suggestions but I still cannot get this workbench to work. I attached the featureReader to the BoundExtractor output port as suggested. This works ok with one file (the _GR refererenced black bounding box one) but as soon as I bring in the file that is not geo-referenced then it all fails and general says the parameters are invalid. I also tried AggregateTransformer andFeatureMerger to merge the files but that failed also. (screenshot below)

I have looked at videos and forums and tried many variations but I can't find anything that explains or shows the methodology from start to finish. Does anyone have any other hints that I could try?

I really just want the non geo-referenced file to get the Extents from the geo-referenced file and display the raster map image in the correct location.

Thanks for the help so far!

Badge +22

Thanks for the suggestions but I still cannot get this workbench to work. I attached the featureReader to the BoundExtractor output port as suggested. This works ok with one file (the _GR refererenced black bounding box one) but as soon as I bring in the file that is not geo-referenced then it all fails and general says the parameters are invalid. I also tried AggregateTransformer andFeatureMerger to merge the files but that failed also. (screenshot below)

I have looked at videos and forums and tried many variations but I can't find anything that explains or shows the methodology from start to finish. Does anyone have any other hints that I could try?

I really just want the non geo-referenced file to get the Extents from the geo-referenced file and display the raster map image in the correct location.

Thanks for the help so far!

You should not have the second tiff Reader.

 

 

You should have one reader set to the file that has to the correct georeferencing information. It connects to the BoundsExtractor which connects to the featureReader.

 

 

The featureReader parameters should be set to the file that is missing the georeferencing infomation, and attributes should be merged.

 

 

 

You will then have on feature coming out of the Feature Reader, it will still be missing the georeferencing information, but it will have the attributes of the correct feature. You can then use the RasterGeoreferencer and CoordinateSystemSetter.

 

 

There is no need to use the FeatureMerger.

 

 

Reply