Perl mapscript reprojecting WKT issues

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Fri May 25 23:59:24 EDT 2007


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?

Cheers

..Tom



More information about the mapserver-users mailing list