Perl mapscript reprojecting WKT issues

Tamas Szekeres szekerest at GMAIL.COM
Tue May 29 17:31:37 EDT 2007


Tom,

I've tested the equivalent code with c# and Windows, here's the output
of the program:

POINT (-75 45)
POINT (1578125.6146771896 -198241.98781270601)

I cannot decide whether the results are correct, but it does't crash anyway.

Best regards,

Tamas


2007/5/29, Kralidis,Tom [Burlington] <Tom.Kralidis at ec.gc.ca>:
> > Kralidis,Tom [Burlington] writes:
> >
> > > Hi,
> > >
> > > MapServer 4.10.0
> > > FreeBSD
> > >
> > > I have a Perl script where I'd like to reproject a WKT
> > string.  Here's
> > > the code:
> > >
> > > #!/usr/bin/perl
> > >
> > > use strict;
> > > use warnings;
> > >
> > > use mapscript 4.10.0;
> > >
> > > my $projInObj  = new mapscript::projectionObj("init=epsg:4326");
> > > my $projOutObj = new mapscript::projectionObj("init=epsg:42304");
> > >
> > > my $shape = mapscript::shapeObj::fromWKT("POINT(-75 45)");
> > >
> > > print $shape->toWKT()."\n";
> > >
> > > $shape->project($projInObj, $projOutObj) || die "Can't reproject:
> > > $!\n";
> > >
> > > print $shape->toWKT()."\n";
> > >
> > > The script dies on the shapeObj project call.
> > >
> > > Any suggestions or ideas?
>
> Can anyone run this script (you might have to change epsg:42304 if you
> don't have it defined in your proj epsg file) successfully?
>
> I notice that this functionality was as a result of RFC2
> (http://mapserver.gis.umn.edu/development/rfc/ms-rfc-2).  Just not sure
> if it's my syntax that's off or if this could be a potential bug?
>
> ..Tom
>



More information about the mapserver-users mailing list