Contours again.

Ed McNierney ed at TOPOZONE.COM
Wed Oct 13 19:13:35 EDT 2004


Bob -

I'm not entirely sure from your reply that you understood that Armin's first suggestion is to simply use shptree to create a spatial index for your single shapefile.  In the directory where your shapefile is stored, simply use the command

    shptree shapefile.shp

and a file with the same base name and the extension .qix will be created.  Then you can run your test again - creating the index will just take a few moments and you don't have to do anything with your data organization.

I'm assuming, by the way, that your test request is actually displaying only a small portion of the entire shapefile.  If you're trying to draw the entire 550 MB shapefile in a single image, you have different problems <g>.

     - Ed

Ed McNierney
TopoZone.com

----- Original Message -----
From: Bob Basques <bob.basques at CI.STPAUL.MN.US>
To: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: Wed, 13 Oct 2004 17:56:00 -0400
Subject: Re: [UMN_MAPSERVER-USERS] Contours again.


> Armin Burger wrote:
> 
> >Bob,
> >
> >you could also try just creating a spatial index for the shapefile using s=
> >hptree. 2 minutes looks like there is no existing spatial index and more o=
> >r less all features of the shapefile are read all the time.
> >
> Yes I think this is correct.
> 
> >Maybe this ind=
> >ex already speeds up things sufficiently.
> >
> >Instead of splitting up the contour lines into seperate shapefiles that ha=
> >ve then to be put together with a shapeindex, it might be an alternative t=
> >o intersect the contour lines with a regular grid. E.g. like the sheets fo=
> >r topographic maps or a rectangular one with arbitrary extent you create o=
> >n your own. That way very long lines with huge amount of vertices are spli=
> >t up into smaller chunks.
> >
> I actually started out with something like that in the AutoCAD world.
> Each tile (1/2 sq. mile) was brought together into a single coverage.  I
> didn't do any joins on the linework, I just let them be seperate
> entities.  I figured that was better than joining them anyway.
> 
> > The time to read such features is much less than=
> > for the large ones, but you still have everything in a single shapefile.
> >
> >If you want just display the values as integer, it might be the easiest wa=
> >y to add a new integer column in the dbf file and copy the values from the=
> > float column. And then use the new integer column  for the labeling.
> >
> >
> Good idea, although I think I'll just get rid of the old column
> afterwards.  I tried some things with the data writer(AutoCAD Map) but
> nothing seemed to help with the labelling.
> 
> I think your idea will work though.  I can load the DBF up and add a
> column easy enough.
> 
> Thanks for the suggestions
> 
> bobb
> 
> >armin
> >
> >
> >
> >>All,
> >>
> >>
> >
> >
> >
> >>Well I tried out a composite file before asking this question.
> >>
> >>
> >
> >
> >
> >>I just ran a 550+meg SHP file for our Contour data.  There is only one
> >>attribute in the DBF, which is the elevation.
> >>
> >>
> >
> >
> >
> >>a Typical request takes around 120 sec to complete.  so I'm going to try
> >>and tile the shp file out into smaller version and use a tile index on
> >>top of that.  Are there any pitfalls I should watch out for during the
> >>process of tiling a SHP file?
> >>
> >>
> >
> >
> >
> >
> >>Also, how do I label with a INTEGER vs a REAL for the elevations.  I'm
> >>getting  14 decimal places in the labels.  :c)
> >>
> >>
> >
> >
> >
> >
> >>Thanks
> >>
> >>
> >
> >
> >
> >>bobb
> >>
> >>
> >
> >
> >
> 



More information about the mapserver-users mailing list