Skip to main content
Question

Attaching one rastermap flush with another rastermap

  • April 28, 2017
  • 6 replies
  • 45 views

femo
Contributor
Forum|alt.badge.img+6

Hi,

I need to atach a new geotiff to an existing one. The extents of the new maps overlap with the existing ones, therfore i want to clip the new raster so that they are displayed flush with the existing ones.

To achieve this, i think i need the "real bounds" (data extent) of the existing raster for the subsequent clipping process. If I clip with the bounding box I would expect gaps between the maps!

Until now I have achieved this:

- lower left corner and lower right corner(the bounding box is bigger than the real data extent):

Above you see the process. I wonder how I can get a polygon that represents the outershell of the

real data extent? Any ideas out there?

Best wishes

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

david_r
Celebrity
  • April 28, 2017

You can use the BoundingBoxReplacer to replace a raster feature with a polygon of the raster extents, if that's what you need.


takashi
Celebrity
  • April 28, 2017

Hi @femo, if the "real bounds" means the minimum rectangle area containing all the cells except Nodata ones, the "Data MBR Extents" option for the Extents Type in the RasterExtentsCoercer should be exactly what you want. However, the option seems not to work in FME 2017.0 (build 17280). There seems to be a bug here. [Edit] It was wrong. The bug is found in FME 2017.1 Beta build 17479.

In the interim, you can use the BoundingBoxReplacer to transform the Data Extents (MultiArea) to a single MBR (Minimum Bounding Rectangle) extents polygon, as @david_r suggested.

takashi
Celebrity
  • April 28, 2017

Hi @femo, if the "real bounds" means the minimum rectangle area containing all the cells except Nodata ones, the "Data MBR Extents" option for the Extents Type in the RasterExtentsCoercer should be exactly what you want. However, the option seems not to work in FME 2017.0 (build 17280). There seems to be a bug here. [Edit] It was wrong. The bug is found in FME 2017.1 Beta build 17479.

In the interim, you can use the BoundingBoxReplacer to transform the Data Extents (MultiArea) to a single MBR (Minimum Bounding Rectangle) extents polygon, as @david_r suggested.
I was wrong. The "Data MBR Extents" option works fine in FME 2017.0 build 17280. I found the bug with FME 2017.1 Beta build 17479.

femo
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 28, 2017

Hi @femo, if the "real bounds" means the minimum rectangle area containing all the cells except Nodata ones, the "Data MBR Extents" option for the Extents Type in the RasterExtentsCoercer should be exactly what you want. However, the option seems not to work in FME 2017.0 (build 17280). There seems to be a bug here. [Edit] It was wrong. The bug is found in FME 2017.1 Beta build 17479.

In the interim, you can use the BoundingBoxReplacer to transform the Data Extents (MultiArea) to a single MBR (Minimum Bounding Rectangle) extents polygon, as @david_r suggested.
hi @takashi and @david_r ,

 

 

what I am looking for is an irregular shaped polygon. If you take a look at the two first screenshots the lower side of the polygon would go from the lower brownish corner at the left to the lower brownish corner at the right. A boundingboxreplacer would cover to much area.

 


takashi
Celebrity
  • April 28, 2017
hi @takashi and @david_r ,

 

 

what I am looking for is an irregular shaped polygon. If you take a look at the two first screenshots the lower side of the polygon would go from the lower brownish corner at the left to the lower brownish corner at the right. A boundingboxreplacer would cover to much area.

 

Perhaps does the convex hull of the Data Extents fit to your requirement? If so, the ConverReplacer can be used. [Edit] sorry for the typo. I meant HullReplacer.

 


femo
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • May 2, 2017

Hi @takashi,

the HullReplacer with hulltype=convex does the job!

Thank you very much!