use of shp2tile and ogrtindex

Frank Warmerdam warmerdam at POBOX.COM
Thu Aug 9 13:15:58 EDT 2007


Antonio wrote:
> ----------------------------------------------
> 
> Hi Frank,
> You have right , "doesn't work" isn't much, here is what I did:
> I have already a big shape file with a .dbf with the field "location" 
> that point the .tif images and others some columns of data.
> So using
> shpt2tile -q 4 -n 2 NGS54004L NGS54004smaller
> it generate me a bunch of smaller shapefiles.
> After that I used
> ogrtinedx NewTileindex NGS54004smaller*
> to generate a tileindex.
> No error and all work fine so far.
> I use NewTileindex in two map file. The first one is defined a layer 
> TYPE POLYGON and in the second one TYPE RASTER
> The first one works fine , I can see what I saw before with the original 
> shapefile.
> The second doesn't show me any images.
> 
> I don't know but probably I have to use gdaltindex to generate tileindex 
> for raster layers.
> The only problem is that gdaltindex use a .tif images and then I lost 
> all the info stored in my previous .dbf file.

Antonio,

OK, as I understand it then you are essentially wanting to use a
shapefile of raster footprints and file locations as a tileindex
for a raster layer.  But you have also broken this big file into
tiles and tileindexed that.

You can't directly use such a tileindexed tileindex in a raster layer's
TILEINDEX - *but* you should be able to use the name of the polygon
layer in the raster tileindex in which case things should work.   This
is the technique of using another layer as a tileindex and it can also
be utilized to take advantage of an RDBMS or other file formats as the
tileindex instead of using a shapefile.

I will say I'm personally dubious that you could have a raster tileindex
large enough to justify breaking it down this way.  If you build a qix
for the raster tileindex, surely the query would be fast enough unless
it has millions of records (scary!)

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list