Opened 15 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 , 15 years ago
Cc: | added |
---|---|
Milestone: | → 5.4 release |
Owner: | changed from | to
comment:2 by , 15 years ago
Component: | MapScript-Python → MapServer Documentation |
---|
Commited to SVN trunk in r8389. The documentation must be updated.
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Documentation updated in r8391.
Note:
See TracTickets
for help on using tickets.
Assigned to Alan to add this new projectionObj.getUnits() method to both SWIG and PHP MapScript, and update relevant docs.