MapScript: drawing points with Perl

P Kishor punk.kish at GMAIL.COM
Thu Apr 26 23:28:32 EDT 2007


Hi Benoit,

Attached is a small example that adds points to a shapefile. It was
written for a custom application, but you can easily adjust it to your
needs. As you can see, you don't even need MapScript to add points.
You can manipulate Shapefiles directly using Geo:: Shapelib module.

Hope this helps you.

Puneet.

On 4/23/07, Benoit Myard <myardbenoit at gmail.com> wrote:
> Hi list,
>
> I'm trying to set up an application whose goal is to add Point data to
> an existing map using Perl MapScript. My plan is to put all that's
> static in a mapfile and to draw the points afterwards.
>
> For now, I haven't managed to draw anything except what's in the
> mapfile and I would like to know if there is anything special I should
> know. For example, when you create a point, which projection is in use
> ?
>
> I attached a sample script which should draw a big point over Paris
> but actually doesn't.
>
>
> Also, I noted that I can't "use strict;" since the MapScript Variables
> (MS_ON, MS_SINGLE, ...) produce errors even when you prefix them with
> 'mapserver::' :
>
> Argument "MS_ON" isn't numeric in subroutine entry at
> /opt/csw/lib/perl/site_perl/mapscript.pm line 35.
>
>
> Allthough there is not much documentation for the Perl-side of
> MapScript, the MapScript API Reference should be sufficient. Just in
> case someone is aware of some well-rounded documentation or examples
> for Perl MapScript, it would be great to share with others :).
>
>
> Thanks in advance.
>
> --
> Benoit Myard
>
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
---------------------------------------------------------------------
collaborate, communicate, compete
=====================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insertshape.pl
Type: text/x-perl-script
Size: 6950 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070426/ec655498/insertshape.bin


More information about the mapserver-users mailing list