Skip to main content

Hi All,

 

I am trying to merge several raster tiles into a single one using RasterMosaicker. Unfortunately, in the output raster you are able to see horizontal and vertical white lines as well as a horizontal black line at the bottom.

 

Please note these are not present after georeferencing the tiles and is only after the used of the RasterMosaicker transformer that they appears.

 

CaptureCapture2 

Is there a transformer I need to use prior this or are the parameters within the RasterMosaicker the ones need altering?

 

Any ideas welcome!

 

Thanks,

Ana

When you are georeferencing your tiles, do you have a NoData value set?


When you are georeferencing your tiles, do you have a NoData value set?

Capture@jdh​, I have added a NoData value using RasterBandNodataSetter prior to RasterMosaicker.

 

It has actually worked by deleting the white horizontal and vertical lines; however, the think black line at the bottom is still present but is now displayed in white colour as per above image.

 

FYI, I am setting the NoData value to 0.

 

 


Capture@jdh​, I have added a NoData value using RasterBandNodataSetter prior to RasterMosaicker.

 

It has actually worked by deleting the white horizontal and vertical lines; however, the think black line at the bottom is still present but is now displayed in white colour as per above image.

 

FYI, I am setting the NoData value to 0.

 

 

If you use a RasterBandNoDataRemover after the mosaicker than it that line will go back to being black.

I think its presence is caused by a lack of precision in the georeferencing, there is a 1 pixel gap between the end of one image and the start of another.

In the ideal you would mosaic the images first and then reproject/georeference the single image, but I don't know if that's possible with your source images.


Capture@jdh​, I have added a NoData value using RasterBandNodataSetter prior to RasterMosaicker.

 

It has actually worked by deleting the white horizontal and vertical lines; however, the think black line at the bottom is still present but is now displayed in white colour as per above image.

 

FYI, I am setting the NoData value to 0.

 

 

CaptureThe thing is that after the set of images are georeferenced the raster images seems to snap perfectly as per image above. It is true that the line seems to always be located before the end row of images. I also notice that when I extract the properties of the georeferenced raster the columns and rows are 256x256; whereas after using the RasterMosaicker 1282 rows x 1280 columns.

 

Your suggestion of using RasterMosaicker prior georeferencing the tiles does not work for my scenario as I am georeferencing multiple images in one go.

 

Is there any other suggestion you might think of to avoid this ?

 

 


Capture@jdh​, I have added a NoData value using RasterBandNodataSetter prior to RasterMosaicker.

 

It has actually worked by deleting the white horizontal and vertical lines; however, the think black line at the bottom is still present but is now displayed in white colour as per above image.

 

FYI, I am setting the NoData value to 0.

 

 

Are you georeferencing by point and spacing, or by bounding coordinates?

What is the precision of your coordinates? If you take your lower left coordinatate and add 256*y_spacing to it, does it match the lower left coordinate of the image in the next row exactly?


Capture@jdh​, I have added a NoData value using RasterBandNodataSetter prior to RasterMosaicker.

 

It has actually worked by deleting the white horizontal and vertical lines; however, the think black line at the bottom is still present but is now displayed in white colour as per above image.

 

FYI, I am setting the NoData value to 0.

 

 

I am using bounding coordinates to georeference the images.

 

The below are the bounding coordinates for the first column composed by 5 different row. Hopefully you are able to calculate if the precision is correct as I did not understand what you meant by 256*.

 CaptureCapture


Capture@jdh​, I have added a NoData value using RasterBandNodataSetter prior to RasterMosaicker.

 

It has actually worked by deleting the white horizontal and vertical lines; however, the think black line at the bottom is still present but is now displayed in white colour as per above image.

 

FYI, I am setting the NoData value to 0.

 

 

@jdh​, I was able to take a further look at your suggestion and as you can see, the coordinates of the tile edges coincide with its adjoining tiles. So I am still unable to find out why when I mosaic the raster I find those lines in between. Capture


@jdh​ I found what was the issue and was to do with how I handle the Cell Size using Mapnik Rasterizer. So even though I am still able to see the lines using FME Inspector, once I write them to PNG they are fine once I amended the Cell Size attribute.

 

Many thanks for your time looking into this and hopefully this helps someone else too.


Reply