[mapserver-users] Multiple Shapepaths?

Shawn L Johnston sjohnston at satshot.com
Thu Sep 20 04:12:36 PDT 2001



On Thu, 20 Sep 2001, Stephan Dunning wrote:

> Is it possible to employ two separate shapepaths or mapfiles for one map
> with multiple layers, one for permanent shapes/layers and one for temporary
> shapes/layers to be purged daily?

Sure can. I beleive you want to use the 'DATA' tag in the Layer Object
section to specify the path. What I've done is to set a root directory
with the SHAPEPATH tag and then use the DATA tag to specify directorys
under the root...

so something like:

	/vectors
	   |
	   |
	   ---/2000_vectors
	   |
	   |
	   ---/2001_vectors

And the mapfile would look something like:

# Start of Mapfile
	NAME blah
	SHAPEPATH "/vectors/"
	...

	LAYER
	   NAME foo
	   TYPE	polyline
	   DATA "2000_vectors/foo"
	   ...

> Each database query performed by a user on my app creates a dbf and
> ultimately a shapefile to use in mapserver, but I have writing these temp
> shapes to the same directory as my other permanent shapes.  I'd like to
> store them separately in order to automatically purge the temp directory on
> a daily basis.
>
> Thoughts?

I'm running an older version of mapserver, on the newer versions you might
be able to even do without the SHAPEPATH and just list the full path to
the shapefile for each layer. I think I tried to do this, but had some
problems, but that was with 3.2.20.

Cheers,

Shawn




More information about the MapServer-users mailing list