[postgis-users] Newbie postgis application question

Paul Ramsey pramsey at refractions.net
Sat Aug 3 21:40:41 PDT 2002


Kevin Murphy wrote:
> 
> I noticed the link to Mapserver, which looks promising, but it seems to be
> overkill for what I want to do at the moment.  Of course, if I do any other
> mapping projects (and I'd like to), the time investment might pay off.
> Actually, that's why I'm looking at PostGIS instead of just looking up the
> algorithms and rolling my own solution.

On your 'one map per county' project, you might very well find that
spending an hour or so on mapserver and mapscript saves you oodles of
time down the road. Doing your project with a postgis/mapscript
combination is basically trivial.

(a) set up a mapserver map file which gives things the colors you want,
labels you want, etc etc
(b) load the counties into postgis
(c) foreach county in "select extent(thecounty) from counties"
    (d) use mapscript to load the map file into a new map object
        set the map extent to the county extent (plus a bit)
        set the map projection to a nice local projection
        render and save map

It would boil down to a 100 line map file, maybe, most of it just
standard stuff and maybe 20 or 30 lines of mapscript.




More information about the postgis-users mailing list