[OSGeo-Discuss] Best tool, shapefile to png, web
Mike Toews
mwtoews at gmail.com
Mon Aug 16 20:41:41 PDT 2010
On 16 August 2010 15:39, Peter <webwiz at pl.net> wrote:
> - open a http socket to a CGI eg
Opps, my bad. MapServer operates in two modes: CGI and MapScript. It
looks like you want to go into MapScript mode for your application.
Available in almost all of the P languages: PHP, Perl and Python.
#!/usr/bin/python
import mapscript
map = mapscript.mapObj("/home/mapdata/mymap.map")
img = map.draw()
img.save("/home/mapdata/mymap.png")
Again, the MAP file is required, but you can probably template that
somehow and use it in a temporary file for your script.
-Mike
More information about the Discuss
mailing list