[Mapserver-users] can I create a layer based on a mysql query?

Aaron Kreider aaron at campusactivism.org
Fri Apr 16 17:12:05 PDT 2004


I have a project where I want to be able to show groups that are part of a larger network, on 
a map of the US.

I have 500 groups and about 50 networks (a many to many relationship). So instead of 
showing all 500 groups, I only want to show the 1-50 that would belong to the network.

I am wondering if I can create one shape file for the groups, and then do some kind of query 
to generate a layer (a query combining the groups and networks tables) or do I need to 
create 50 shape files - one for each network?

I'm using MySQL (3.23) and PHP Mapscript.

This information would be constantly updated, so if I needed 50 shape files, I'd have to run 
gen2shp 50 times each day. And actually it's worse, because I need to do this for several 
other objects and in total have about 500 shape files to create.  

>From the Mapserver 4.0 documentation It looks like this might be possible with Oracle 
(???), but I don't have access to that.

Thanks,

Aaron





More information about the MapServer-users mailing list