On Wed, 20 Jun 2012 10:18:06 PM Casper Børgesen wrote: > As I understand you use gdaltindex to create the tile index for each level. > Further more you create the properties file at the root of the pyramid.
I create a properties file at the root and a properties file for each level. The below description is based on trial and error getting things to work. As described it works for me. I haven't looked at the geoserver code at all. Root directory The root properties file specifies the number of levels, the name of the directory containing the level and scale of that level. It also contains the name of the layer and the bounding envelope. In my case (and I think yours) the directory names happen to be numbers. The LevelDirs and Levels properties must have (at least) the number of entries specified by the LevelsNum property. Levels contains a comma separated pairs of numbers giving the x and y size of each pixel in projected units. The root level also contains a .prj file specifying the projection of the data. For example I have a ImagePyramid layer called bathy_pyramid: >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"]] Level directory gdaltindex creates the tile index as a shape file (.shp .shx, .dbf). The shape file has the same name as the layer. The properties file for a level specifies only one level and specifies the attribute of the shape file instead of directories (as specified in gdaltindex - default is location). The Name and Envelope2D attributes of the level properties file must match the root properties file. The level also has a projection file which I suspect must be identical to the root one. >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 > If I try to update an existing ImagePyramid store, restart Geoserver, it > seems like Geoserver is updating all the index files anyway. My experience is that if Geoserver doesn't like the properties file for an ImagePyramid for any reason it will try and generates its own (often unsuccessfully if its assumption aren't met). (Worst case the properties file it generates is invalid and thereafter any GetCapabilities request will fail. This is particularly problematic as this problem can be triggered by a single bad image in the pyramid being read, which in a large pyramid with some uninteresting data it may be some weeks after you make any changes before a user requests that area/scale and breaks the whole server). Good luck Gordon ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users