On Mon, 16 Aug 2010 20:41:41 -0700
Mike Toews <mwto...@gmail.com> wrote:

> On 16 August 2010 15:39, Peter <web...@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.
> 

Just to round out this suggestion, mapserver comes with an executble
"shp2img" which does, I believe, exactly what the OP wants.
You do indeed need the MAP file, (which can be made with QGIS, as
someone mentioned) then you just run
shp2img -m <your *.map> -o <your image.png>

Should be a "piece of cake". No books required ;-)
-- 
Micha

> -Mike
> _______________________________________________
> Discuss mailing list
> Discuss@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/discuss
> 
> This mail was received via Mail-SeCure System.
> 
> 

_______________________________________________
Discuss mailing list
Discuss@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/discuss

Reply via email to