Monday, 18 November 2019

GeoServer: Best way to publish 2500 TIFF or 71 ECW files?


I have ortophotos of an area that I need to serve as a background map for my vectors. I got it as 2500 files (71,5MB each) in raw TIFF format with corresponding TFW word file - 180GB of data. Coordinate system is local and it matches with my vectors (there is no EPSG code for it but I named it as “32805” and put a proper definition).


For desktop use in MapInfo I converted them to ECW (with some tool that comes with MapInfo) and retile as much bigger to have only 71 file because opening 2500 tiff files is overkill. I just merged 49 TIFF’s (7x7) into one ECW - 35000x35000pixels – largest is around 200MB) It works great and its really fast in MapInfo.


Now I am quite confused - HOW to serve them in GeoServer ?


I have publish one TIFF and one ECW for comparison. ECW is much faster in browser preview (I am aware of ECW server licensing issue but that shouldn’t be a problem). I have found a presentation “GeoServer on steroids” and read about ImageMosaic, ImagePyramid, retiling, adding overview etc it was quite informative but still don’t know what to do.


My question is : how should I do it ? Mosaic or Pyramid, and if is one of the answers positive, I need your advice or some hints. I would really like to be ECW because of disk space so there will be no need to keep 180GB of tiff’s on a server.


Data will be served through LAN with maximum 20 users connected at peak hour.SQL server have not so huge amount of data. Sorry if I miss some other info, but I will send it if needed.





Geoserver 2.1.4, Windows 7 32bit, 2GB System Memory, (1.7.0_09 (Java HotSpot(TM) Server VM), Native JAI+Native JAI ImageIO = true






Original TIFF
gdalinfo D:\75720-47970.tif
Driver: GTiff/GeoTIFF
Files: D:\75720-47970.tif
D:\75720-47970.tfw
Size is 5000, 5000
Coordinate System is `'
Origin = (7572000.000000000000000,4797500.000000000000000)

Pixel Size = (0.100000000000000,-0.100000000000000)
Metadata:
TIFFTAG_SOFTWARE=Adobe Photoshop 7.0
TIFFTAG_DATETIME=2006:10:09 13:02:57
TIFFTAG_XRESOLUTION=72
TIFFTAG_YRESOLUTION=72
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:

Upper Left ( 7572000.000, 4797500.000)
Lower Left ( 7572000.000, 4797000.000)
Upper Right ( 7572500.000, 4797500.000)
Lower Right ( 7572500.000, 4797000.000)
Center ( 7572250.000, 4797250.000)
Band 1 Block=5000x1 Type=Byte, ColorInterp=Red
Band 2 Block=5000x1 Type=Byte, ColorInterp=Green
Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue
-------------


ECW file which is retiled from 7x7 original tiffs

gdalinfo D:\OF-45.ecw
Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Files: D:\OF-45.ecw
Size is 35000, 35000
Coordinate System is:
LOCAL_CS["LOCAL - (unsupported)",
UNIT["Meter",1]]
Origin = (7571500.000000000000000,4798500.000000000000000)

Pixel Size = (0.100000000000000,-0.100000000000000)
Corner Coordinates:
Upper Left ( 7571500.000, 4798500.000)
Lower Left ( 7571500.000, 4795000.000)
Upper Right ( 7575000.000, 4798500.000)
Lower Right ( 7575000.000, 4795000.000)
Center ( 7573250.000, 4796750.000)
Band 1 Block=35000x1 Type=Byte, ColorInterp=Red

Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136

Band 2 Block=35000x1 Type=Byte, ColorInterp=Green
Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136
Band 3 Block=35000x1 Type=Byte, ColorInterp=Blue
Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136

Answer



I ran an experiment with a TIFF file and an ECW. Started with a 1.2 GB ECW, and converted it to TIFF with compression and pyramids, it was ~1.5 GB. So I think that a TIFF can be a similar size to an ECW.


I would mosaic the image using GDAL, ensuring that compression is on. Then build pyramids, and if the resulting file is reasonable (less than 10 GB, I suppose) I'd just let GeoServer do the rest.


Performance between PostGIS and TIFF will favour the tiff, I understand.


References:




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...