[mapserver-users] [Fwd: analysis question]

Stephen Lime steve.lime at dnr.state.mn.us
Wed Sep 19 08:31:29 PDT 2001


It's possible to do this totally dynamically but the performance would likely be poor. I would recommend pre-processing the data to add the number of clients to the polygon coverage. That could be scripted so that you could run it as your client coverage changes.

Basically you want to run a series of queries using MapScript. Not the PHP version, but with perl, python or tk/tcl so that you can run this outside of a web environment. The easiest way to do this would be like this:

  - for each point in the client file select the polygon (zone) it falls in (point select)

  - update a counter for that zone

  - after all points have been processed you now have a tally of the number of clients for each zone

  - add those totals as a new item in the zone attribute table

Now you can easily map the density with PHP or the MapServer CGI version. Re-run the density script as necessary to update your zone data.

Steve

Stephen Lime
Data and Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Vladimir Guzmán <vguzman at main-task.com> 09/19/01 09:43 AM >>>

Hello everybody.
I'm wondering if there is a way to draw some kind of analysis in maps
through mapscript-php:

I have a point coverage with clients in it.
I have a polygon coverage with zones in it.
I need to generate a map of density of clients by zone.
For example, I need
zone 1 in red color, because it have 100 clients.
zone 2 in pink color, because it have 50 clients.
zone 3 in white color, bacause it have 0 clients.
and so on...

Is it possible?
How do I do it?

Thanks in Advance,


Vladimir G




More information about the MapServer-users mailing list