[Geoserver-users] Grid lines showing in ImageMosaic layer

GeoServer 2.8.2

I am creating an ImageMoasic from GeoTiff images created with gdal commands:

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES -co JPEG_QUALITY=85 $infile $outfile

gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average $outfile 2 4 8 16 32 64 128

When viewing tiled mode in the OpenLayers preview at full resolution (about 1 meter) or near full resolution, I get these grid lines. This doesn’t happen when using single tile mode.

I found this post with a similar issue, but the solutions won’t work for me.

http://gis.stackexchange.com/questions/82746/white-lines-in-merged-geotiff-files-after-imagemosaicing-on-geoserver

Inline image 1

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com

Do you face the problem at all zoom levels?

image.png

···

On Wed, Apr 20, 2016 at 3:50 PM, Jason Newmoyer <jason@anonymised.com> wrote:

GeoServer 2.8.2

I am creating an ImageMoasic from GeoTiff images created with gdal commands:

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES -co JPEG_QUALITY=85 $infile $outfile

gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average $outfile 2 4 8 16 32 64 128

When viewing tiled mode in the OpenLayers preview at full resolution (about 1 meter) or near full resolution, I get these grid lines. This doesn’t happen when using single tile mode.

I found this post with a similar issue, but the solutions won’t work for me.

http://gis.stackexchange.com/questions/82746/white-lines-in-merged-geotiff-files-after-imagemosaicing-on-geoserver

Inline image 1

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com


Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Can you please try to add less overviews?

I guess 2 4 8 16 32 is sufficient in your case (well it depends on the dimensions of your granules). Maybe you can send a gdalinfo of a geotiff in order to take a look.

image.png

···

On Wed, Apr 20, 2016 at 7:53 PM, Jason Newmoyer <jason@anonymised.com> wrote:

No only at near full resolution. So for this data that’s around 1:2,000. I see the lines anywhere from about 1:8,000 all the way down to 1:1.

Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com

On Wed, Apr 20, 2016 at 12:30 PM, Alessio Fabiani <alessio.fabiani@anonymised.com> wrote:

Do you face the problem at all zoom levels?

Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Wed, Apr 20, 2016 at 3:50 PM, Jason Newmoyer <jason@anonymised.com> wrote:

GeoServer 2.8.2

I am creating an ImageMoasic from GeoTiff images created with gdal commands:

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES -co JPEG_QUALITY=85 $infile $outfile

gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average $outfile 2 4 8 16 32 64 128

When viewing tiled mode in the OpenLayers preview at full resolution (about 1 meter) or near full resolution, I get these grid lines. This doesn’t happen when using single tile mode.

I found this post with a similar issue, but the solutions won’t work for me.

http://gis.stackexchange.com/questions/82746/white-lines-in-merged-geotiff-files-after-imagemosaicing-on-geoserver

Inline image 1

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com


Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Alessio,

Does having the extra overviews cause an issue? I assumed its better to have more than you need rather than less. Since at a factor of 64 or beyond they really cost almost nothing in terms of processing or space.

Here is the gdalinfo for one of my tiles.

Driver: GTiff/GeoTIFF
Files: test123456789.tif
Size is 16384, 16384
Coordinate System is:
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]]
Origin = (40.614871499950851,6.385383283001418)
Pixel Size = (0.000004499999999,-0.000004500000000)
Metadata:

image.png

···

On Thu, Apr 21, 2016 at 4:05 AM, Alessio Fabiani <alessio.fabiani@anonymised.com> wrote:

Can you please try to add less overviews?

I guess 2 4 8 16 32 is sufficient in your case (well it depends on the dimensions of your granules). Maybe you can send a gdalinfo of a geotiff in order to take a look.

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com

Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Wed, Apr 20, 2016 at 7:53 PM, Jason Newmoyer <jason@anonymised.com> wrote:

No only at near full resolution. So for this data that’s around 1:2,000. I see the lines anywhere from about 1:8,000 all the way down to 1:1.

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com

On Wed, Apr 20, 2016 at 12:30 PM, Alessio Fabiani <alessio.fabiani@anonymised.com> wrote:

Do you face the problem at all zoom levels?

Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Wed, Apr 20, 2016 at 3:50 PM, Jason Newmoyer <jason@anonymised.com> wrote:

GeoServer 2.8.2

I am creating an ImageMoasic from GeoTiff images created with gdal commands:

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES -co JPEG_QUALITY=85 $infile $outfile

gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average $outfile 2 4 8 16 32 64 128

When viewing tiled mode in the OpenLayers preview at full resolution (about 1 meter) or near full resolution, I get these grid lines. This doesn’t happen when using single tile mode.

I found this post with a similar issue, but the solutions won’t work for me.

http://gis.stackexchange.com/questions/82746/white-lines-in-merged-geotiff-files-after-imagemosaicing-on-geoserver

Inline image 1

Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com


Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

So, looking at the GDAL_INFO output I suggest to retile internally the granules as square tiles (e.g.: 512x512).

You can use gdal_transale -co “TILED=YES” -co “BLOCKXSIZE=512” -co “BLOCKYSIZE=512” in order to do that. This will improve a lot the performances.

Moreover, generally speaking, it is not advisable to have overviews with size lower than the internal tiling. You will force the server to do unuseful extra-work other than risk to introduce artifacts.

Therefore in this case overviews of size 512x512 are sufficient (2 4 8 16 32).

Try if it works like this.

Also, if you do the preview using an OpenLayers-like client in tiling mode, you must be sure that the browser page zoom level is 100% otherwise it may introduce unwanted lines in the middle at client side.

I hope it will work just following those steps, otherwise the issue may be more serious.

Also, which versions of GeoServer and GeoTools are you using?

···

On Thu, Apr 21, 2016 at 3:49 PM, Jason Newmoyer <jason@anonymised.com> wrote:

Alessio,

Does having the extra overviews cause an issue? I assumed its better to have more than you need rather than less. Since at a factor of 64 or beyond they really cost almost nothing in terms of processing or space.

Here is the gdalinfo for one of my tiles.

Driver: GTiff/GeoTIFF
Files: test123456789.tif
Size is 16384, 16384
Coordinate System is:
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]]
Origin = (40.614871499950851,6.385383283001418)
Pixel Size = (0.000004499999999,-0.000004500000000)
Metadata:

Image Structure Metadata:
COMPRESSION=YCbCr JPEG
INTERLEAVE=PIXEL
SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left ( 40.6148715, 6.3853833)
Lower Left ( 40.6148715, 6.3116553)
Upper Right ( 40.6885995, 6.3853833)
Lower Right ( 40.6885995, 6.3116553)
Center ( 40.6517355, 6.3485193)
Band 1 Block=16384x512 Type=Byte, ColorInterp=Red
Overviews: 8192x8192, 4096x4096, 2048x2048, 1024x1024, 512x512, 256x256, 128x128
Band 2 Block=16384x512 Type=Byte, ColorInterp=Green
Overviews: 8192x8192, 4096x4096, 2048x2048, 1024x1024, 512x512, 256x256, 128x128
Band 3 Block=16384x512 Type=Byte, ColorInterp=Blue
Overviews: 8192x8192, 4096x4096, 2048x2048, 1024x1024, 512x512, 256x256, 128x128

Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
jason@anonymised.com

So, looking at the GDAL_INFO output I suggest to retile internally the

granules as square tiles (e.g.: >512x512).

Somehow I did not send the proper Gdalinfo output. I am using the
gdal-default internal tile size of 256x256.

I am now unable to reproduce this issue, and not sure what changed. I will
keep an eye out for it.

generally speaking, it is not advisable to have overviews with size lower

than the internal tiling. You will >force the server to do unuseful
extra-work other than risk to introduce artifacts.

Good tip, I did not know that.

be sure that the browser page zoom level is 100% otherwise it may introduce

unwanted lines in the >middle at client side

Also experimented with this to try and reproduce, but no luck.

Thanks!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Grid-lines-showing-in-ImageMosaic-layer-tp5262121p5263517.html
Sent from the GeoServer - User mailing list archive at Nabble.com.