Opened 16 years ago

Closed 15 years ago

#2798 closed enhancement (fixed)

Python Mapscript: Adding getUnits() to projectionObj

Reported by: dstrevinas Owned by: aboudreault
Priority: normal Milestone: 5.4 release
Component: Documentation - MapServer Version: unspecified
Severity: minor Keywords:
Cc: dmorissette, sdlime

Description

Index: mapscript/swiginc/projection.i
===================================================================
--- mapscript/swiginc/projection.i      (revision 8002)
+++ mapscript/swiginc/projection.i      (working copy)

         /* no debug output here */
         return msOGCWKT2ProjectionObj(wkt, self, MS_FALSE);
     }
+
+    int getUnits() {
+      return GetMapserverUnitUsingProj(self);
+    }
 }

Tried it with various different projections -> returns the unit types correctly. Sample:

nativeunits = ( mapscript.projectionObj(mapObj.getProjection()) ).getUnits()

Change History (3)

comment:1 by dmorissette, 16 years ago

Cc: dmorissette sdlime added
Milestone: 5.4 release
Owner: changed from dmorissette to aboudreault

Assigned to Alan to add this new projectionObj.getUnits() method to both SWIG and PHP MapScript, and update relevant docs.

comment:2 by aboudreault, 15 years ago

Component: MapScript-PythonMapServer Documentation

Commited to SVN trunk in r8389. The documentation must be updated.

comment:3 by aboudreault, 15 years ago

Resolution: fixed
Status: newclosed

Documentation updated in r8391.

Note: See TracTickets for help on using tickets.