Hi folks,

I’ve been looking at how to best prepare historical aerial photos for 
Geoserver. I had issues with exporting from ArcMap the individual aerial frames 
into Geotiffs – losing quality along the way. I’ve since worked that out.

I tried to apply Paul Ramsey’s GDAL steps to the exported files but didn’t get 
very far as these errors occurred:

C:\Program Files (x86)\GDAL>gdal_translate.exe -co COMPRESS=JPEG -co 
PHOTOMETRIC=YCBCR -co TILED=YES Aerial_1930.tif Aerial_1930-new.tif
Input file size is 3541, 3438
ERROR 1: MissingRequired:TIFF directory is missing required "StripOffsets" field
0ERROR 6: PHOTOMETRIC=YCBCR requires a source raster with only 3 bands (RGB)

The 1930 aerial frame is black and white (as you would expect for the era). So 
I think the 2nd error is related to that. I tried removing the PHOTOMETRIC 
option from the command but…

C:\Program Files (x86)\GDAL>gdal_translate.exe -co COMPRESS=JPEG -co TILED=YES 
Aerial_1930.tif Aerial_1930-new.tif
Input file size is 3541, 3438
ERROR 1: MissingRequired:TIFF directory is missing required "StripOffsets" field
0...10...20...30...40...50...60...70...80ERROR 1: JPEGSetupEncode:BitsPerSample 
16 not allowed for JPEG
...ERROR 1: An error occured while writing a dirty block
ERROR 1: JPEGSetupEncode:BitsPerSample 16 not allowed for JPEG

I decided to turn to a more recent image:

C:\Program Files (x86)\GDAL>gdal_translate.exe -co COMPRESS=JPEG -co 
PHOTOMETRIC=YCBCR -co TILED=YES Aerial_1994.tif Aerial_1994-new.tif
Input file size is 5521, 5361
0...ERROR 1: JPEGSetupEncode:BitsPerSample 16 not allowed for JPEG
ERROR 1: WriteEncodedTile/Strip() failed.
ERROR 1: JPEGSetupEncode:BitsPerSample 16 not allowed for JPEG
ERROR 1: WriteEncodedTile/Strip() failed.
ERROR 1: An error occured while writing a dirty block
ERROR 1: JPEGSetupEncode:BitsPerSample 16 not allowed for JPEG
ERROR 1: WriteEncodedTile/Strip() failed.
ERROR 1: JPEGSetupEncode:BitsPerSample 16 not allowed for JPEG
ERROR 1: WriteEncodedTile/Strip() failed.
ERROR 1: JPEGSetupEncode:BitsPerSample 16 not allowed for JPEG
ERROR 1: WriteEncodedTile/Strip() failed.

This is the first workflow I’ve tried and I’m open to any that others on the 
list might use when preparing Geotiff for Geoserver.

Many thanks and happy Friday (in Australia),
Neil


From: Jody Garnett <jody.garn...@gmail.com>
Sent: Wednesday, 21 July 2021 4:09 PM
To: Neil Saunders <neil.saund...@lotsearch.com.au>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Getting the best results with Raster

Neil:

Can you describe more in what way the quality is lacking? Is it distorted, or 
pixelated, or what? Did you do any data prep to your geotiff, say introduce an 
overview? If so what sampling technique did you use?
What does "gdalinfo" return for your image?

Some general guidance from Paul Ramsey is here 
https://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html
--
Jody Garnett


On Tue, 20 Jul 2021 at 19:00, Neil Saunders 
<neil.saund...@lotsearch.com.au<mailto:neil.saund...@lotsearch.com.au>> wrote:
Hi folks,

Apologies if this is a basic question – I’m fairly new to GIS data.

I’m using Geoserver 2.18.2 to host historical aerial clips and exporting the 
rasters with Arc Map 10.6 to Geotiff with a 500m buffer of a property. However 
I’m finding the quality of the image in Geoserver does not match the quality in 
Arc Map when zoomed in.

I’ve tried exporting at different DPI but find 300 or above has no discernible 
improvement. I’m not using any compression when creating the TIFF and using 
GeoTIFF Tags. I’ve read about resampling and how it can alter the image quality 
but not sure if that’s it.

Assuming this is not a new challenge, I’m curious what steps others have taken 
to get raster clips into Geoserver in a way that doesn’t compromise the image 
quality? I’m using the most detailed historical aerial photography as the use 
case requires inspection of features at the street level. Any help gratefully 
received!

Kind Regards,
Neil Saunders
Business Consultant

[cid:image001.png@01D79051.0A7799C0]
How was your Lotsearch experience? Click 
here<https://airtable.com/shrkB2wJTJQ52z6e9>.

Lotsearch Pty Ltd
Level 3, 68 Alfred Street, Milsons Point, NSW 2061
+61 (0)2 8287 0680
+61 (0) 413 379 883
supp...@lotsearch.com.au<mailto:supp...@lotsearch.com.au>
www.lotsearch.com.au<http://www.lotsearch.com.au>


CONFIDENTIAL INFORMATION
This transmission may be privileged and may contain confidential information 
intended only for the recipient(s) named above. Any other distribution, 
re-transmission, copying or disclosure of this message is strictly prohibited.
If you have received this transmission in error, please notify me immediately 
by telephone or return email, and delete this message from your system. Thank 
you.

[LinkedIn]<https://linkedin.com/company/4823161>


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


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

Reply via email to