Skip to content

Commit

Permalink
BUG: Update GeodIntermediateFlag for future Python compatibility (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 authored Aug 4, 2021
1 parent b4bfaa1 commit 0176be6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Latest
:class:`pyproj.crs.coordinate_operation.AzimuthalEquidistantConversion`
and :class:`pyproj.crs.coordinate_operation.LambertAzimuthalEqualAreaConversion` (issue #882)
- BUG: Make datum name match exact in :func:`pyproj.database.query_utm_crs_info` (pull #887)
- BUG: Update :class:`pyproj.enums.GeodIntermediateFlag` for future Python compatibility (issue #855)

3.1.0
-----
Expand Down
14 changes: 11 additions & 3 deletions pyproj/_geod.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,24 @@ out_azis: Any

cdef int GEOD_INTER_FLAG_DEFAULT = GeodIntermediateFlag.DEFAULT

cdef int GEOD_INTER_FLAG_NPTS_MASK = GeodIntermediateFlag.NPTS_MASK
cdef int GEOD_INTER_FLAG_NPTS_MASK = (
GeodIntermediateFlag.NPTS_ROUND
| GeodIntermediateFlag.NPTS_CEIL
| GeodIntermediateFlag.NPTS_TRUNC
)
cdef int GEOD_INTER_FLAG_NPTS_ROUND = GeodIntermediateFlag.NPTS_ROUND
cdef int GEOD_INTER_FLAG_NPTS_CEIL = GeodIntermediateFlag.NPTS_CEIL
cdef int GEOD_INTER_FLAG_NPTS_TRUNC = GeodIntermediateFlag.NPTS_TRUNC

cdef int GEOD_INTER_FLAG_DEL_S_MASK = GeodIntermediateFlag.DEL_S_MASK
cdef int GEOD_INTER_FLAG_DEL_S_MASK = (
GeodIntermediateFlag.DEL_S_RECALC | GeodIntermediateFlag.DEL_S_NO_RECALC
)
cdef int GEOD_INTER_FLAG_DEL_S_RECALC = GeodIntermediateFlag.DEL_S_RECALC
cdef int GEOD_INTER_FLAG_DEL_S_NO_RECALC = GeodIntermediateFlag.DEL_S_NO_RECALC

cdef int GEOD_INTER_FLAG_AZIS_MASK = GeodIntermediateFlag.AZIS_MASK
cdef int GEOD_INTER_FLAG_AZIS_MASK = (
GeodIntermediateFlag.AZIS_DISCARD | GeodIntermediateFlag.AZIS_KEEP
)
cdef int GEOD_INTER_FLAG_AZIS_DISCARD = GeodIntermediateFlag.AZIS_DISCARD
cdef int GEOD_INTER_FLAG_AZIS_KEEP = GeodIntermediateFlag.AZIS_KEEP

Expand Down
3 changes: 0 additions & 3 deletions pyproj/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,12 @@ class GeodIntermediateFlag(IntFlag):

DEFAULT = 0x0

NPTS_MASK = 0xF
NPTS_ROUND = 0x0
NPTS_CEIL = 0x1
NPTS_TRUNC = 0x2

DEL_S_MASK = 0xF0
DEL_S_RECALC = 0x00
DEL_S_NO_RECALC = 0x10

AZIS_MASK = 0xF00
AZIS_DISCARD = 0x000
AZIS_KEEP = 0x100

0 comments on commit 0176be6

Please sign in to comment.