Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
share|improve this question
    
sys49152: do either of these answers really address your question? –  BradHards Jan 25 '13 at 5:05
    
Yes, both helped me. But I dont have ArcGIS so I've used GDAL. I compared ECW and TIF. First I tried TIFs. It worked OK, then I tried ECW tiles as it is. Loading in web browsers was much faster with ECW ! But after a while from time to time my Tomcat crash. Dont know how to address that problem, but it seems related to ECW. When I am not using ECW Tomcat is stable. –  sys49152 Jan 25 '13 at 11:03
add comment

2 Answers

up vote 6 down vote accepted
+50

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:

share|improve this answer
    
this is exact answer which I gave before!! –  Krystian Jan 25 '13 at 13:39
add comment

I had a similar problem few weeks ago . I resolved it this way:

  1. creating pyramids rasters image (all rasters had got pyramids depends on standard scale rate in my project
  2. creating tiles from raster (mosaic)
  3. putting all files to postgis (by WKTRaster)

By this way you get MRDB (multi-resolution data base) which is the most effective way of serving a large amount of data.

After above you can just simply connect GeoServer to PostGIS and serve your data. Based on my own example, I had to use 82 ortophotomaps (40GB of data) in my application, so I did as followed and it works great! The disadvantage of this situation is that raster tiles are much bigger than the source ones. So in my case the data grew from 40GB to ~96GB.

EDIT And you should monitor yours server parameters because 2GB of RAM and win7 + geoserver + postgres can choke sometimes. Maybe a good way of increasing performance would be moving the DB to another machine, or changing Win7 to Linux (or both of those) because *nix system are less expensive than a MS one.

share|improve this answer
    
What was the format for the original data (e.g. uncompressed TIFF, ECW, MrSID, etc)? How did you configure this layer in GeoServer? –  BradHards Jan 19 '13 at 22:25
    
I had geoTIFFs without any compresion, and about layer configuration you can read here: docs.geoserver.org/stable/en/user/data/raster/… and about instalation postgis raster here: gis4free.wordpress.com/2011/03/10/… I suggest you to look around on WKTRaster page which I gave you in my answer above. –  Krystian Jan 20 '13 at 2:25
    
Sorry, I wanted you to post your exact configuration. –  BradHards Jan 20 '13 at 2:26
    
I don't get it, you want my configuration files for instance? If yes show me which files, or maybe you could show me difficulty which you have. –  Krystian Jan 20 '13 at 2:29
1  
I don't have any. I want to get enough information for the original poster to get a workable solution though. You showed an answer without the real tools and specific configuration. Show the steps to make the pyramid raster, show the exact command line or other process to make the raster mosiac, show the specific tools you used for WKTRaster, show the setup for geoserver and the postgis raster configuration. –  BradHards Jan 20 '13 at 2:34
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.