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

Daniel Morissette morissette at dmsolutions.ca
Thu Jul 5 10:48:54 PDT 2001


Rob Martinson wrote:
> 
> 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,

If I understood your problem right, I think what you need is to use
tiled shapefiles... you would have a master shapefile that contains your
county boundaries, with one polygon per county, and the path to the
shapefile for each county in an attribute (called LOCATION I think). 
Then the tile index shapefile is referred to as the TILEINDEX parameter
in your mapserver layer defn.  When Mapserver draws that layer, it scans
the tileindex file, and displays all the counties whose extents fall in
the current map extents.

I think an example would help... is there any demo using TILEINDEX
anywhere Steve?

Another option could be to use a MapInfo "Seamless TAB dataset"... it's
supported directly by OGR and does a job equivalent to what MapServer's
tiled shapefiles do.

Also, about SDE being the only DB format available, I think that's not
true any more... I think Frank Warmerdam added support for the new
PostGIS (http://postgis.refractions.net/) database in OGR... so you
could use the OGR2OGR tool to load your layers in a PostGIS database,
and then use MapServer + OGR to serve maps from that database.  I'm not
sure what the status of all those components is though... perhaps Frank
can comment on this.
-- 
------------------------------------------------------------
 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