Thanks to all who replied.  Magic that I turned out doing was to build the 
subdirectories (level directories) as imagemosaics, then create an imagepyramid 
store pointing to the root directory.  Geoserver was very happy with that and I 
got exactly the results I was hoping for.  Did not need to retile or translate. 
 Very good stuff!!

E. Scott Stricker
703-561-3671

-----Original Message-----
From: Gordon Keith [mailto:[email protected]] 
Sent: Thursday, November 01, 2012 6:21 PM
To: [email protected]
Subject: EXT :Re: [Geoserver-users] Issues with image pyramid

On Fri, 2 Nov 2012 07:16:59 AM Stricker, Scott wrote:
> Apologies if this is not the right forum for this question.
> 
> I'm trying to setup geoserver environment for demo purposes to display 
> satellite imagery such as truemarble imagery 
> (http://www.unearthedoutdoors.net/global_data/true_marble/download).
> 
> I'd like to set it up as follows
> Scale > A - show one set of tiles
> Scale range < A and > B higher res set of tiles Scale range < B and > 
> C even higher res set of tiles And so on.


> Can I build an 'image pyramid' data set manually? For example, 
> configure geoserver to use 32km TIFF for lowest resolution 1km TIFF 
> tiles for next 500m tiles for next resolution level 250m tiles for 
> highest resolution
> 
> Seems like it should be fairly straightforward - what am I missing?
> 
> Thanks for any help/pointers/links that can be provided?

I build my image pyramids manually (well I've automated it using a bash script
- attached for reference).

The requirements as I understand them (mostly from trial and error):

The root directory has a .properties file and a .prj file which both have the 
same name as pyramid layer.

Each level of the pyramid is in a separate directory which contains an 
ImageMosaic consisting of a number of images (TIFF files), a shape file (.shp, 
.shx, .dbf) created by gdaltindex, a .properties file and a .prj file. The 
properties files is different from the root one while the .prj file is the same 
(don't know if they have to be, but mine all are).

For example I have a layer called bathy_pyramid. 

In my coverages/bathy_pyrmid directory I have:

>more bathy_pyramid.properties
Name=bathy_pyramid
LevelsNum=10
LevelsDirs=1 2 4 8 16 32 64 128 256 512
Envelope2D=109.8395984985,-64.0000001972 173.9999996985,0.1604010028
Levels=2.44618395E-4,2.44618395E-4 4.89236791E-4,4.89236791E-4
9.78473581E-4,9.78473581E-4 0.00195694716,0.00195694716
0.00391389432,0.00391389432 0.00782778865,0.00782778865
0.0156555773,0.0156555773 0.0313111546,0.0313111546 0.0626223092,0.0626223092
0.125244618,0.125244618

>more bathy_pyramid.prj
GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 
6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], 
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 
0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic 
latitude", NORTH], AUTHORITY["EPSG","4326"]]

>ls 512
bathy_110_174_-64_0_bathy.tif
bathy_pyramid.dbf
bathy_pyramid.prj
bathy_pyramid.properties
bathy_pyramid.shp
bathy_pyramid.shx

>more 512/bathy_pyramid.properties
Name=bathy_pyramid
LocationAttribute=location
LevelsNum=1
Envelope2D=109.8395984985,-64.0000001972 173.9999996985,0.1604010028
Levels=0.125245,0.125245


Points to note:
- The Name and Envelope2D fields for all the properties files for a pyramid 
must be identical.
- geoserver must have at least read access to all files and write access to the 
directories (very easy to overlook when you do things manually)
- The Levels field in the root properties file is used by geoserver to 
determine which level to use for the resolution requested, I'm not sure of the 
algorithm but you can play with the numbers to get it to do what you want. The 
Levels field in the level directories is the pixels size of the TIFFs, I think 
this must match the TIFFs and all the TIFFs must have the same resolution. The 
Levels field in the level properties and the corresponding value in the root 
properties don't have to be the same, but in my case always are.
- The number of (space separated) entries in LevelDirs and Levels in the root 
properties file must be exactly LevelsNum
- The value of the LocationAttribute field of the level properties file matches 
the field name used in gdaltindex, e.g.:
gdaltindex -tileindex location bathy_pyramid.shp *.tif

Hope this helps
Gordon

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to