Opened 17 years ago

Closed 17 years ago

#2135 closed defect (duplicate)

projection error

Reported by: edmarmoretti Owned by: mapserverbugs
Priority: high Milestone: 5.0 release
Component: MapScript-PHP Version: 4.10
Severity: major Keywords: area projection
Cc: edmar.moretti@…

Description

I need project a shape and calculate the area, but, the result is not correct:

<?php

$wkt = "POLYGON ((-48.5190906467759575 -10.3694247662893702, -44.7171016213105545 -6.4122525152947691, -43.5532274298415558 -12.3092150854043680, -48.5190906467759575 -10.3694247662893702))";

$projInObj = ms_newprojectionobj("proj=latlong,ellps=GRS67");

$projOutObj = ms_newprojectionobj("proj=laea,ellps=GRS67,lat_0=-12,lon_0=-52,x_0=500000,y_0=10000000,units=m"); $geo = ms_shapeObjFromWkt($wkt);

echo "<br> Area before projection: ".$geo->getarea();

result 13.5129188146 ok

$geo->project($projInObj,$projOutObj);

echo "<br>Area after projection: ".$geo->getarea();

result 13.5129188146 !!!!!!!

/* MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE */

?>

Change History (1)

comment:1 by hobu, 17 years ago

Milestone: 4.10.3 release5.0 release
Resolution: duplicate
Status: newclosed

Ed,

This bug is duplicate of #2107 and is fixed for the upcoming 5.0 release.

Howard

Note: See TracTickets for help on using tickets.