Skip to content

Commit

Permalink
updated to only have one PJ_CONTEXT per pyproj session (#376)
Browse files Browse the repository at this point in the history
* updated to only have one PJ_CONTEXT per pyproj session

* updated tests to unset datadir
  • Loading branch information
snowman2 authored Jul 21, 2019
1 parent 5e7b157 commit 9e8c3bc
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 127 deletions.
2 changes: 1 addition & 1 deletion docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Change Log
(:meth:`~pyproj.geod.Geod.geometry_area_perimeter` & :meth:`~pyproj.geod.Geod.geometry_length`)
(pull #366)
* Removed deprecated functions `Proj.proj_version`, `CRS.is_valid`, and `CRS.to_geodetic()` (pull #371)

* Updated to only have one PJ_CONTEXT per pyproj session (issue #374)

2.2.2
~~~~~
Expand Down
12 changes: 5 additions & 7 deletions pyproj/_crs.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cdef class Axis:
cdef readonly object unit_code

@staticmethod
cdef create(PJ_CONTEXT* projcontext, PJ* projobj, int index)
cdef create(PJ* projobj, int index)

cdef class AreaOfUse:
cdef readonly double west
Expand All @@ -20,12 +20,11 @@ cdef class AreaOfUse:
cdef readonly object name

@staticmethod
cdef create(PJ_CONTEXT* projcontext, PJ* projobj)
cdef create(PJ* projobj)


cdef class Base:
cdef PJ *projobj
cdef PJ_CONTEXT *projctx
cdef readonly object name


Expand Down Expand Up @@ -75,7 +74,7 @@ cdef class Param:
cdef readonly object unit_category

@staticmethod
cdef create(PJ_CONTEXT* projcontext, PJ* projobj, int param_idx)
cdef create(PJ* projobj, int param_idx)


cdef class Grid:
Expand All @@ -88,7 +87,7 @@ cdef class Grid:
cdef readonly object available

@staticmethod
cdef create(PJ_CONTEXT* projcontext, PJ* projobj, int grid_idx)
cdef create(PJ* projobj, int grid_idx)


cdef class CoordinateOperation(Base):
Expand All @@ -109,7 +108,6 @@ cdef class CoordinateOperation(Base):
cdef class _CRS(Base):
cdef PJ_TYPE _type
cdef PJ_PROJ_INFO projpj_info
cdef char *pjinitstring
cdef readonly object srs
cdef readonly object type_name
cdef object _ellipsoid
Expand All @@ -121,4 +119,4 @@ cdef class _CRS(Base):
cdef object _target_crs
cdef object _geodetic_crs
cdef object _coordinate_system
cdef object _coordinate_operation
cdef object _coordinate_operation
Loading

0 comments on commit 9e8c3bc

Please sign in to comment.