[postgis-users] Generating PNGs from PostGIS
Dane Springmeyer
blake at hailmail.net
Fri Sep 5 13:35:16 PDT 2008
Hi Dylan,
Comments/questions inline...
On Sep 5, 2008, at 12:11 PM, Dylan Lorimer wrote:
> Thanks everyone for the awesome suggestions! Given that I need this
> to be command line driven, Mapnik looks to be the best option.
Well, do you need it to be command line in the sense that you need to
interactively use the script from the terminal or in the sense that
you need it to run programmatically and serverside?
For the latter approach you'll be best off using MapServer, GeoServer,
or Mapnik(with the Mapnik WMS Server) to read in stylesheets and then
output images via apache.
For the former approach, then the question is whether you need a self
contained command line utility to do the work for you (like
MapServer's shp2img) or whether you are up for writing your own.
Either way you will need to find a way to build a big stylesheet that
will work for all your potential data or build it dynamically based on
different data sources.
> Though the fact that QGIS builds the .map files is tempting as well.
Yes, this is really helpful, but not so much if you need a fully
command line solution as this requires using the GUI interface to
create and export the Mapfiles with styles defined.
> In any event, thanks again for the suggestions. I'll report back on
> how successful I am with Mapnik.
Mapnik can be tricky to build/install unless you are really good at
following instructions for the dependencies. :)
See: http://trac.mapnik.org/ for platform specific install guides.
>
>
> On other thought: what about throwing a WMS on top of PostGIS and
> then programmatically requesting the data I need via WMS URL
> request? You can pass a SQL query in part of the request using the
> OGC FILTER syntax, right?
Sure, that is what MapServer's cgi and Mapnik's fastcgi WMS server
primarily do. You can pass really complex queries both within the
MapServer mapfile and the Mapnik XML mapfile, but you are still left
with the question of how to apply styling to your dynamically fetched
data, which can be tricky.
For reference Mapnik's PostGIS driver info can be found here: http://trac.mapnik.org/wiki/PostGIS
Cheers,
Dane
>
>
> -dylan
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list