Skip to content

Commit

Permalink
CLN: PJ_WKT2_2018->PJ_WKT2_2019; remove ContextManager; ctypedef (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 authored Jun 20, 2020
1 parent 9f87aed commit 283b3b4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
8 changes: 4 additions & 4 deletions pyproj/_crs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ cdef _to_wkt(
supported_wkt_types = {
WktVersion.WKT2_2015: PJ_WKT2_2015,
WktVersion.WKT2_2015_SIMPLIFIED: PJ_WKT2_2015_SIMPLIFIED,
WktVersion.WKT2_2018: PJ_WKT2_2018,
WktVersion.WKT2_2018_SIMPLIFIED: PJ_WKT2_2018_SIMPLIFIED,
WktVersion.WKT2_2019: PJ_WKT2_2018,
WktVersion.WKT2_2019_SIMPLIFIED: PJ_WKT2_2018_SIMPLIFIED,
WktVersion.WKT2_2018: PJ_WKT2_2019,
WktVersion.WKT2_2018_SIMPLIFIED: PJ_WKT2_2019_SIMPLIFIED,
WktVersion.WKT2_2019: PJ_WKT2_2019,
WktVersion.WKT2_2019_SIMPLIFIED: PJ_WKT2_2019_SIMPLIFIED,
WktVersion.WKT1_GDAL: PJ_WKT1_GDAL,
WktVersion.WKT1_ESRI: PJ_WKT1_ESRI
}
Expand Down
3 changes: 0 additions & 3 deletions pyproj/_datadir.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ cdef void pyproj_context_initialize(
PJ_CONTEXT* context,
bint free_context_on_error,
network=*) except *

cdef class ContextManager:
cdef PJ_CONTEXT *context
5 changes: 3 additions & 2 deletions pyproj/base.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ cdef int _DOUBLESIZE = sizeof(double)


cdef extern from "math.h":
cdef enum:
ctypedef enum:
HUGE_VAL


cdef extern from "Python.h":
cdef int PyBUF_WRITABLE
ctypedef enum:
PyBUF_WRITABLE
int PyObject_GetBuffer(PyObject *exporter, Py_buffer *view, int flags)
void PyBuffer_Release(Py_buffer *view)

Expand Down
27 changes: 13 additions & 14 deletions pyproj/proj.pxi
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# PROJ.4 API Defnition
cdef extern from "proj.h":
cdef enum:
PROJ_VERSION_MAJOR
PROJ_VERSION_MINOR
PROJ_VERSION_PATCH
cdef int PROJ_VERSION_MAJOR
cdef int PROJ_VERSION_MINOR
cdef int PROJ_VERSION_PATCH
void proj_context_set_search_paths(
PJ_CONTEXT *ctx, int count_paths, const char* const* paths)
int proj_context_set_database_path(PJ_CONTEXT *ctx,
Expand Down Expand Up @@ -34,7 +33,7 @@ cdef extern from "proj.h":
PJ *proj_create (PJ_CONTEXT *ctx, const char *definition)
PJ *proj_normalize_for_visualization(PJ_CONTEXT *ctx, const PJ* obj)

cdef struct PJ_PROJ_INFO:
ctypedef struct PJ_PROJ_INFO:
const char *id
const char *description
const char *definition
Expand Down Expand Up @@ -71,7 +70,7 @@ cdef extern from "proj.h":
double lam, phi, z


cdef union PJ_COORD:
ctypedef union PJ_COORD:
double v[4];
PJ_XYZT xyzt;
PJ_UVWT uvwt;
Expand All @@ -88,7 +87,7 @@ cdef extern from "proj.h":

PJ_COORD proj_coord (double x, double y, double z, double t)

cdef enum PJ_DIRECTION:
ctypedef enum PJ_DIRECTION:
PJ_FWD = 1 # Forward
PJ_IDENT = 0 # Do nothing
PJ_INV = -1 # Inverse
Expand All @@ -109,7 +108,7 @@ cdef extern from "proj.h":
ctypedef struct PJ_AREA
PJ *proj_create_crs_to_crs(PJ_CONTEXT *ctx, const char *source_crs, const char *target_crs, PJ_AREA *area)

cdef enum PJ_COMPARISON_CRITERION:
ctypedef enum PJ_COMPARISON_CRITERION:
PJ_COMP_STRICT
PJ_COMP_EQUIVALENT
PJ_COMP_EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS
Expand Down Expand Up @@ -138,8 +137,8 @@ cdef extern from "proj.h":
ctypedef enum PJ_WKT_TYPE:
PJ_WKT2_2015
PJ_WKT2_2015_SIMPLIFIED
PJ_WKT2_2018
PJ_WKT2_2018_SIMPLIFIED
PJ_WKT2_2019
PJ_WKT2_2019_SIMPLIFIED
PJ_WKT1_GDAL
PJ_WKT1_ESRI

Expand Down Expand Up @@ -357,10 +356,10 @@ cdef extern from "proj.h":
int i_step)

ctypedef enum PJ_CATEGORY:
PJ_CATEGORY_ELLIPSOID,
PJ_CATEGORY_PRIME_MERIDIAN,
PJ_CATEGORY_DATUM,
PJ_CATEGORY_CRS,
PJ_CATEGORY_ELLIPSOID
PJ_CATEGORY_PRIME_MERIDIAN
PJ_CATEGORY_DATUM
PJ_CATEGORY_CRS
PJ_CATEGORY_COORDINATE_OPERATION
PJ *proj_create_from_database(PJ_CONTEXT *ctx,
const char *auth_name,
Expand Down

0 comments on commit 283b3b4

Please sign in to comment.