shp2tile question

Bart van den Eijnden bartvde at XS4ALL.NL
Mon Apr 11 14:58:58 EDT 2005


Hi,

It is tile4ms, not tile2ms, probably a typo by Steve.

It is a Mapserver utility to make a tileindex. Alternatively, you can also
use ogrtindex for vector layers and gdaltindex for raster layers.

Best regards,
Bart

On Mon, 11 Apr 2005 14:54:06 -0400, Don Deskins <dldeskins at GMAIL.COM>
wrote:

> Stephen,
>
> Thank you for your reply.
>
> what is the tile2ms command in your answer?  I do not find it on
> google or this list
>
> Thanks again.
>
> On Apr 11, 2005 1:01 PM, Stephen Woodbridge <woodbri at swoodbridge.com>
> wrote:
>> Don Deskins wrote:
>> > hello, another newbie question.
>> >
>> > My project has large shp files (2 are greater than 1 gig).  My obvious
>> > solution to the speed problem was to tile the shp files.
>> >
>> > After (finally) getting shp2tile compiled, I tried several different
>> option
>> > combinations and got what were to me unexpected results.  What I
>> expected
>> > was some kind of world file for each tile and then use shptree to
>> index the
>> > files.  What I got of course was a series of shp files.
>>
>> If you just want to index your shapefile then use shptree shapefile.shp
>>
>> > My questions are as follows:
>> >
>> > 1.  How do I figure out how many rows and colums to use in the
>> shp2tile
>> > program?  The shp file contains approx 54000 shapes.
>>
>> There is no magic number. If you data is spread evenly over the area
>> then you can expect row*col tile or about 54000/(row*col) in each tile.
>> You might have to try some different sizes to get something you are
>> happy with.
>>
>> > 2.  If i use the quadtree option, how do I know what value to use?
>>
>> Pick the number so that is is as large as possible and that you are
>> displaying most of the records for each map draw. That way you open the
>> least number of files and you use most all of the objects in each file
>> you open. Sorry, no magic number.
>>
>> > 3.  Is there a way to create an index on the shp files that are
>> produced
>> > with the shp2tile program, so that I do not have to create a layer
>> for each
>> > shp file?
>>
>> After you run shp2tile also run:
>>
>> find /path/to/files -name "*.shp" -exec shptree {} \;
>> find /path/to/files -name "*.shp" > tileindex.in
>> tile2ms tileindex.in tileindex
>> shptree tileindex
>>
>> and now you can reference you files in a single layer using:
>> TILEINDEX "tileindex"
>>
>> -Steve
>>
>> > 4.  What else am I missing?
>> >
>> > Thanks,
>> >
>> > Don
>> >
>>
>>
>
>
> --
> Don Deskins
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/



More information about the mapserver-users mailing list