Ticket #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
Note: See
TracTickets for help on using
tickets.
