Ticket #2798 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

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

Changed 5 years ago by dmorissette

  • cc dmorissette, sdlime added
  • owner changed from dmorissette to aboudreault
  • milestone set to 5.4 release

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

Changed 4 years ago by aboudreault

  • component changed from MapScript-Python to MapServer Documentation

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

Changed 4 years ago by aboudreault

  • status changed from new to closed
  • resolution set to fixed

Documentation updated in r8391.

Note: See TracTickets for help on using tickets.