[mapserver-users] Building maps without a .map usingMapScript only

Ed McNierney ed at topozone.com
Thu Jul 5 16:30:43 EDT 2001


Steve -

Is there any info/guidance/expertise available on SHPTREE tuning vs.
tiled shapefiles vs. both?  Tiling shapefiles is just another way to
index the data for faster access (esp. trivial rejection), but it does
mean you end up splitting features into multiple objects.  I'd also be
interested in more notes/comments from anyone on SHPTREE indexing
experience, esp. with the "new index" format now available.

	- Ed

Ed McNierney
Chief Mapmaker
TopoZone.com
(978) 251-4242

-----Original Message-----
From: Stephen Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: Thursday, July 05, 2001 2:33 PM
To: morissette at dmsolutions.ca; cathode at nichebox.com
Cc: mapserver-users at lists.gis.umn.edu
Subject: RE: [mapserver-users] Building maps without a .map
usingMapScript only


On the mapObj issue, I've been doing that with the 3.5 perl version and 
queries for sometime now so I know it can work. Haven't tried a draw
though.

MapServer gets extents for layers by actually accessing the layers. For
non-tiled
data that involves opening the file and reading header info. For tiled
data it's a
bit smarter. It used the layer tileindex to determine which tiles to
process and then
proceeds through them. Sounds to me that's what you're refering to in
the last
couple of sentences. Users have used county-based GDT and Tiger for the 
whole country using MapServer. Of course you wouldn't want to display
city 
streets for the whole country at once so tying layers to appropriate
scales is 
important...

BTW I will be adding a LAYER EXTENT property to that you can bypass the
file header check.

Steve


Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> "Rob Martinson" <cathode at nichebox.com> 07/05/01 12:43PM >>>
Thanks for such a quick reply. I'll add myself to Bugzilla and continue
playing with this. Maybe I'll experiment a bit with Mapscript in Perl to
see if I get the same results.

I have a small working sample of Spokane County (ctycu poly, water
polys, place polys and streets)based on TIGER 97 data and have had great
luck so far. Mapserver is fast! 

I do have one question though. Since SDE is the only db format available
currently I have to deal with shape files (and hopefully TAB if I can
get OGR working right). How does Mapserver (or does it) handle loading
layers outside of the current extent? If I have a single map with street
layers for the country by county or state and I zoom to an extent where
they should be displayed (to a place polygon for example) does Mapserver
attempt to load the street layer for the next county over if it's
included in the .map definition? It seems to me that it has no idea
where the extents are unless it does in fact load each layer so I'd like
to load layers dynamically based on the requested extent of the view. Am
I way off base here?

Rob Martinson
Nichebox - http://www.nichebox.com 
Development - http://dev.nichebox.com 

> -----Original Message-----
> From: Daniel Morissette [mailto:morissette at dmsolutions.ca] 
> Sent: Thursday, July 05, 2001 8:21 PM
> To: Rob Martinson
> Cc: 'MapServer List'
> Subject: Re: [mapserver-users] Building maps without a .map 
> using MapScript only
> 
> 
> Rob Martinson wrote:
> > 
> > With the PHP library I'm using ms_newMapObj('') to return 
> an empty map 
> > object to work with. The Mapscript documentation states 
> that this will 
> > return an emtpy object, the PHP does not specifically state 
> this, but 
> > I get no errors at this line. After adding layers and 
> classes I get an 
> > error stating "Invalid Handle" whenever I attempt to call the draw 
> > method of the map using the above.
> > 
> > The same mapping functionality when I use an existing .map 
> file seem 
> > to work fine.
> > 
> 
> Rob,
> 
> I looked at the php_mapscript.c code quickly and I see no 
> reason why this wouldn't work.  It must be a bug that will 
> have to be looked into, hopefully before the 3.5 release.
> 
> I filed it in the bugzilla system as
>     http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=23 
> You can add yourself to the CC: field in the bugzilla 
> interface if you want to be notified when the bug gets fixed.
> 
> Regards,
> -- 
> ------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca 
>  DM Solutions Group              http://www.dmsolutions.ca/ 
> ------------------------------------------------------------
>   Don't put for tomorrow what you can do today, because if 
>       you enjoy it today you can do it again tomorrow.
> 





More information about the mapserver-users mailing list