You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(12) |
2
(3) |
3
(2) |
4
(15) |
5
(4) |
6
(8) |
7
(14) |
8
(10) |
9
(6) |
10
(1) |
11
(5) |
12
(7) |
13
(7) |
14
(1) |
15
|
16
(1) |
17
(2) |
18
(4) |
19
(2) |
20
|
21
(1) |
22
(2) |
23
|
24
|
25
(2) |
26
(1) |
27
|
28
(4) |
29
|
30
(1) |
31
|
|
|
|
|
|
|
Revision: 6021 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6021&view=rev Author: jswhit Date: 2008年08月11日 15:34:30 +0000 (2008年8月11日) Log Message: ----------- up version number Modified Paths: -------------- trunk/toolkits/basemap/src/_geoslib.c trunk/toolkits/basemap/src/_geoslib.pyx Modified: trunk/toolkits/basemap/src/_geoslib.c =================================================================== --- trunk/toolkits/basemap/src/_geoslib.c 2008年08月11日 15:07:49 UTC (rev 6020) +++ trunk/toolkits/basemap/src/_geoslib.c 2008年08月11日 15:34:30 UTC (rev 6021) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.8 on Mon Aug 11 09:07:15 2008 */ +/* Generated by Cython 0.9.8 on Mon Aug 11 09:34:06 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -297,7 +297,7 @@ /* Implementation of _geoslib */ -static char __pyx_k_1[] = "0.1"; +static char __pyx_k_1[] = "0.2"; static char __pyx_k_is_valid[] = "is_valid"; static char __pyx_k_geom_type[] = "geom_type"; @@ -3480,7 +3480,7 @@ * import sys * import numpy # <<<<<<<<<<<<<< * - * __version__ = "0.1" + * __version__ = "0.2" */ __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_kp_numpy, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1;} @@ -3489,7 +3489,7 @@ /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":4 * import numpy * - * __version__ = "0.1" # <<<<<<<<<<<<<< + * __version__ = "0.2" # <<<<<<<<<<<<<< * * # need some python C API functions for strings. */ Modified: trunk/toolkits/basemap/src/_geoslib.pyx =================================================================== --- trunk/toolkits/basemap/src/_geoslib.pyx 2008年08月11日 15:07:49 UTC (rev 6020) +++ trunk/toolkits/basemap/src/_geoslib.pyx 2008年08月11日 15:34:30 UTC (rev 6021) @@ -1,7 +1,7 @@ import sys import numpy -__version__ = "0.1" +__version__ = "0.2" # need some python C API functions for strings. cdef extern from "Python.h": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6020 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6020&view=rev Author: jswhit Date: 2008年08月11日 15:07:49 +0000 (2008年8月11日) Log Message: ----------- previous commit broke geos 2 compatibility Modified Paths: -------------- trunk/toolkits/basemap/src/_geoslib.c trunk/toolkits/basemap/src/_geoslib.pyx Modified: trunk/toolkits/basemap/src/_geoslib.c =================================================================== --- trunk/toolkits/basemap/src/_geoslib.c 2008年08月11日 13:01:47 UTC (rev 6019) +++ trunk/toolkits/basemap/src/_geoslib.c 2008年08月11日 15:07:49 UTC (rev 6020) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.8 on Sat Aug 9 10:17:12 2008 */ +/* Generated by Cython 0.9.8 on Mon Aug 11 09:07:15 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -228,7 +228,7 @@ /* Type declarations */ -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":131 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":131 * initGEOS(notice_h, error_h) * * cdef class BaseGeometry: # <<<<<<<<<<<<<< @@ -243,7 +243,7 @@ PyObject *boundary; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":249 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":250 * return (self.__class__,(self.boundary,)) * * cdef class Polygon(BaseGeometry): # <<<<<<<<<<<<<< @@ -255,7 +255,7 @@ struct __pyx_obj_8_geoslib_BaseGeometry __pyx_base; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":305 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":306 * return area * * cdef class LineString(BaseGeometry): # <<<<<<<<<<<<<< @@ -267,7 +267,7 @@ struct __pyx_obj_8_geoslib_BaseGeometry __pyx_base; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":337 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":338 * self.boundary = b * * cdef class Point(BaseGeometry): # <<<<<<<<<<<<<< @@ -335,7 +335,7 @@ static PyObject *__pyx_kp_1; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":102 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":102 * int GEOSCoordSeq_getSize(GEOSCoordSeq *s, unsigned int *size) * * cdef void notice_h(char *fmt, char*msg): # <<<<<<<<<<<<<< @@ -364,7 +364,7 @@ __pyx_v_message = Py_None; Py_INCREF(Py_None); __pyx_v_warn_msg = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":103 * * cdef void notice_h(char *fmt, char*msg): * format = PyString_FromString(fmt) # <<<<<<<<<<<<<< @@ -376,7 +376,7 @@ __pyx_v_format = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":104 * cdef void notice_h(char *fmt, char*msg): * format = PyString_FromString(fmt) * message = PyString_FromString(msg) # <<<<<<<<<<<<<< @@ -388,7 +388,7 @@ __pyx_v_message = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":105 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":105 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -397,7 +397,7 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":106 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":106 * message = PyString_FromString(msg) * try: * warn_msg = format % message # <<<<<<<<<<<<<< @@ -413,7 +413,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":107 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":107 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -424,7 +424,7 @@ __Pyx_AddTraceback("_geoslib.notice_h"); if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":108 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":108 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -441,7 +441,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":109 * except: * warn_msg = format * sys.stdout.write('GEOS_NOTICE: %s\n' % warn_msg) # <<<<<<<<<<<<<< @@ -474,7 +474,7 @@ Py_DECREF(__pyx_v_warn_msg); } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":111 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":111 * sys.stdout.write('GEOS_NOTICE: %s\n' % warn_msg) * * cdef void error_h(char *fmt, char*msg): # <<<<<<<<<<<<<< @@ -501,7 +501,7 @@ __pyx_v_message = Py_None; Py_INCREF(Py_None); __pyx_v_warn_msg = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":112 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":112 * * cdef void error_h(char *fmt, char*msg): * format = PyString_FromString(fmt) # <<<<<<<<<<<<<< @@ -513,7 +513,7 @@ __pyx_v_format = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":113 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":113 * cdef void error_h(char *fmt, char*msg): * format = PyString_FromString(fmt) * message = PyString_FromString(msg) # <<<<<<<<<<<<<< @@ -525,7 +525,7 @@ __pyx_v_message = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":114 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":114 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -534,7 +534,7 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":115 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":115 * message = PyString_FromString(msg) * try: * warn_msg = format % message # <<<<<<<<<<<<<< @@ -550,7 +550,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":116 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":116 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -561,7 +561,7 @@ __Pyx_AddTraceback("_geoslib.error_h"); if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":117 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":117 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -578,7 +578,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":118 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":118 * except: * warn_msg = format * sys.stderr.write('GEOS_ERROR: %s\n' % warn_msg) # <<<<<<<<<<<<<< @@ -611,7 +611,7 @@ Py_DECREF(__pyx_v_warn_msg); } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":121 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":121 * * # check library version * cdef geos_version(): # <<<<<<<<<<<<<< @@ -623,7 +623,7 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":122 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":122 * # check library version * cdef geos_version(): * return PyString_FromString(GEOSversion()) # <<<<<<<<<<<<<< @@ -645,7 +645,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":136 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":136 * cdef public object boundary * * def is_valid(self): # <<<<<<<<<<<<<< @@ -659,7 +659,7 @@ PyObject *__pyx_r; char __pyx_1; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":138 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":138 * def is_valid(self): * cdef char valid * valid = GEOSisValid(self._geom) # <<<<<<<<<<<<<< @@ -668,7 +668,7 @@ */ __pyx_v_valid = GEOSisValid(((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":139 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":139 * cdef char valid * valid = GEOSisValid(self._geom) * if valid: # <<<<<<<<<<<<<< @@ -678,7 +678,7 @@ __pyx_1 = __pyx_v_valid; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":140 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":140 * valid = GEOSisValid(self._geom) * if valid: * return True # <<<<<<<<<<<<<< @@ -692,7 +692,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":142 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":142 * return True * else: * return False # <<<<<<<<<<<<<< @@ -710,7 +710,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":144 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":144 * return False * * def geom_type(self): # <<<<<<<<<<<<<< @@ -723,7 +723,7 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":145 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":145 * * def geom_type(self): * return PyString_FromString(GEOSGeomType(self._geom)) # <<<<<<<<<<<<<< @@ -745,7 +745,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":147 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":147 * return PyString_FromString(GEOSGeomType(self._geom)) * * def within(self, BaseGeometry geom): # <<<<<<<<<<<<<< @@ -762,7 +762,7 @@ char __pyx_1; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":150 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":150 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -771,7 +771,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":151 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":151 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -780,7 +780,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":152 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":152 * g1 = self._geom * g2 = geom._geom * answer = GEOSWithin(g1, g2) # <<<<<<<<<<<<<< @@ -789,7 +789,7 @@ */ __pyx_v_answer = GEOSWithin(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":153 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":153 * g2 = geom._geom * answer = GEOSWithin(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -799,7 +799,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":154 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":154 * answer = GEOSWithin(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -813,7 +813,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":156 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":156 * return True * else: * return False # <<<<<<<<<<<<<< @@ -835,7 +835,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":158 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":158 * return False * * def simplify(self, tol): # <<<<<<<<<<<<<< @@ -865,298 +865,311 @@ PyObject *__pyx_v_p; PyObject *__pyx_v_type; PyObject *__pyx_r; - double __pyx_1; - int __pyx_2; + int __pyx_1; + double __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; __pyx_v_b = Py_None; Py_INCREF(Py_None); __pyx_v_p = Py_None; Py_INCREF(Py_None); __pyx_v_type = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":162 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":162 * cdef double tolerance * cdef int numgeoms, i, typeid - * g1 = self._geom # <<<<<<<<<<<<<< - * tolerance = tol - * g3 = GEOSSimplify(g1,tolerance) + * if GEOS_VERSION_MAJOR > 2: # <<<<<<<<<<<<<< + * g1 = self._geom + * tolerance = tol */ - __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; + __pyx_1 = (GEOS_VERSION_MAJOR > 2); + if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":163 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":163 * cdef int numgeoms, i, typeid - * g1 = self._geom - * tolerance = tol # <<<<<<<<<<<<<< - * g3 = GEOSSimplify(g1,tolerance) - * typeid = GEOSGeomTypeId(g3) + * if GEOS_VERSION_MAJOR > 2: + * g1 = self._geom # <<<<<<<<<<<<<< + * tolerance = tol + * g3 = GEOSSimplify(g1,tolerance) */ - __pyx_1 = __pyx_PyFloat_AsDouble(__pyx_v_tol); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_v_tolerance = __pyx_1; + __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":164 - * g1 = self._geom - * tolerance = tol - * g3 = GEOSSimplify(g1,tolerance) # <<<<<<<<<<<<<< - * typeid = GEOSGeomTypeId(g3) - * if typeid == GEOS_POLYGON: + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":164 + * if GEOS_VERSION_MAJOR > 2: + * g1 = self._geom + * tolerance = tol # <<<<<<<<<<<<<< + * g3 = GEOSSimplify(g1,tolerance) + * typeid = GEOSGeomTypeId(g3) */ - __pyx_v_g3 = GEOSSimplify(__pyx_v_g1, __pyx_v_tolerance); + __pyx_2 = __pyx_PyFloat_AsDouble(__pyx_v_tol); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_v_tolerance = __pyx_2; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":165 - * tolerance = tol - * g3 = GEOSSimplify(g1,tolerance) - * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< - * if typeid == GEOS_POLYGON: - * b = _get_coords(g3) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":165 + * g1 = self._geom + * tolerance = tol + * g3 = GEOSSimplify(g1,tolerance) # <<<<<<<<<<<<<< + * typeid = GEOSGeomTypeId(g3) + * if typeid == GEOS_POLYGON: */ - __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); + __pyx_v_g3 = GEOSSimplify(__pyx_v_g1, __pyx_v_tolerance); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":166 - * g3 = GEOSSimplify(g1,tolerance) - * typeid = GEOSGeomTypeId(g3) - * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< - * b = _get_coords(g3) - * p = Polygon(b) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":166 + * tolerance = tol + * g3 = GEOSSimplify(g1,tolerance) + * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< + * if typeid == GEOS_POLYGON: + * b = _get_coords(g3) */ - __pyx_2 = (__pyx_v_typeid == GEOS_POLYGON); - if (__pyx_2) { + __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":167 - * typeid = GEOSGeomTypeId(g3) - * if typeid == GEOS_POLYGON: - * b = _get_coords(g3) # <<<<<<<<<<<<<< - * p = Polygon(b) - * elif typeid == GEOS_LINESTRING: + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":167 + * g3 = GEOSSimplify(g1,tolerance) + * typeid = GEOSGeomTypeId(g3) + * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< + * b = _get_coords(g3) + * p = Polygon(b) */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_3; - __pyx_3 = 0; + __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); + if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":168 - * if typeid == GEOS_POLYGON: - * b = _get_coords(g3) - * p = Polygon(b) # <<<<<<<<<<<<<< - * elif typeid == GEOS_LINESTRING: - * b = _get_coords(g3) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":168 + * typeid = GEOSGeomTypeId(g3) + * if typeid == GEOS_POLYGON: + * b = _get_coords(g3) # <<<<<<<<<<<<<< + * p = Polygon(b) + * elif typeid == GEOS_LINESTRING: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_4; - __pyx_4 = 0; - goto __pyx_L4; - } + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_b); + __pyx_v_b = __pyx_3; + __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":169 - * b = _get_coords(g3) - * p = Polygon(b) - * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< - * b = _get_coords(g3) - * p = LineString(b) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":169 + * if typeid == GEOS_POLYGON: + * b = _get_coords(g3) + * p = Polygon(b) # <<<<<<<<<<<<<< + * elif typeid == GEOS_LINESTRING: + * b = _get_coords(g3) */ - __pyx_2 = (__pyx_v_typeid == GEOS_LINESTRING); - if (__pyx_2) { + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_v_b); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); + __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; + Py_DECREF(__pyx_v_p); + __pyx_v_p = __pyx_4; + __pyx_4 = 0; + goto __pyx_L5; + } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":170 - * p = Polygon(b) - * elif typeid == GEOS_LINESTRING: - * b = _get_coords(g3) # <<<<<<<<<<<<<< - * p = LineString(b) - * # for multi-geom structures, just return first one. + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":170 + * b = _get_coords(g3) + * p = Polygon(b) + * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< + * b = _get_coords(g3) + * p = LineString(b) */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_3; - __pyx_3 = 0; + __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); + if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":171 - * elif typeid == GEOS_LINESTRING: - * b = _get_coords(g3) - * p = LineString(b) # <<<<<<<<<<<<<< - * # for multi-geom structures, just return first one. - * elif typeid == GEOS_MULTIPOLYGON: + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":171 + * p = Polygon(b) + * elif typeid == GEOS_LINESTRING: + * b = _get_coords(g3) # <<<<<<<<<<<<<< + * p = LineString(b) + * # for multi-geom structures, just return first one. */ - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_3; - __pyx_3 = 0; - goto __pyx_L4; - } + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_b); + __pyx_v_b = __pyx_3; + __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":173 - * p = LineString(b) - * # for multi-geom structures, just return first one. - * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< - * numgeoms = GEOSGetNumGeometries(g3) - * gout = GEOSGetGeometryN(g3, 0) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":172 + * elif typeid == GEOS_LINESTRING: + * b = _get_coords(g3) + * p = LineString(b) # <<<<<<<<<<<<<< + * # for multi-geom structures, just return first one. + * elif typeid == GEOS_MULTIPOLYGON: */ - __pyx_2 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); - if (__pyx_2) { + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_v_b); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; + Py_DECREF(__pyx_v_p); + __pyx_v_p = __pyx_3; + __pyx_3 = 0; + goto __pyx_L5; + } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":174 - * # for multi-geom structures, just return first one. - * elif typeid == GEOS_MULTIPOLYGON: - * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< - * gout = GEOSGetGeometryN(g3, 0) - * b = _get_coords(gout) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":174 + * p = LineString(b) + * # for multi-geom structures, just return first one. + * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< + * numgeoms = GEOSGetNumGeometries(g3) + * gout = GEOSGetGeometryN(g3, 0) */ - __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); + __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); + if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":175 - * elif typeid == GEOS_MULTIPOLYGON: - * numgeoms = GEOSGetNumGeometries(g3) - * gout = GEOSGetGeometryN(g3, 0) # <<<<<<<<<<<<<< - * b = _get_coords(gout) - * p = Polygon(b) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":175 + * # for multi-geom structures, just return first one. + * elif typeid == GEOS_MULTIPOLYGON: + * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) */ - __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0); + __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":176 - * numgeoms = GEOSGetNumGeometries(g3) - * gout = GEOSGetGeometryN(g3, 0) - * b = _get_coords(gout) # <<<<<<<<<<<<<< - * p = Polygon(b) - * elif typeid == GEOS_MULTILINESTRING: + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":176 + * elif typeid == GEOS_MULTIPOLYGON: + * numgeoms = GEOSGetNumGeometries(g3) + * gout = GEOSGetGeometryN(g3, 0) # <<<<<<<<<<<<<< + * b = _get_coords(gout) + * p = Polygon(b) */ - __pyx_4 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_4; - __pyx_4 = 0; + __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":177 - * gout = GEOSGetGeometryN(g3, 0) - * b = _get_coords(gout) - * p = Polygon(b) # <<<<<<<<<<<<<< - * elif typeid == GEOS_MULTILINESTRING: - * numgeoms = GEOSGetNumGeometries(g3) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":177 + * numgeoms = GEOSGetNumGeometries(g3) + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) # <<<<<<<<<<<<<< + * p = Polygon(b) + * elif typeid == GEOS_MULTILINESTRING: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_4; - __pyx_4 = 0; - goto __pyx_L4; - } + __pyx_4 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_b); + __pyx_v_b = __pyx_4; + __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":178 - * b = _get_coords(gout) - * p = Polygon(b) - * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< - * numgeoms = GEOSGetNumGeometries(g3) - * gout = GEOSGetGeometryN(g3, 0) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":178 + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) + * p = Polygon(b) # <<<<<<<<<<<<<< + * elif typeid == GEOS_MULTILINESTRING: + * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_2 = (__pyx_v_typeid == GEOS_MULTILINESTRING); - if (__pyx_2) { + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_v_b); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); + __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; + Py_DECREF(__pyx_v_p); + __pyx_v_p = __pyx_4; + __pyx_4 = 0; + goto __pyx_L5; + } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":179 - * p = Polygon(b) - * elif typeid == GEOS_MULTILINESTRING: - * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< - * gout = GEOSGetGeometryN(g3, 0) - * b = _get_coords(gout) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":179 + * b = _get_coords(gout) + * p = Polygon(b) + * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< + * numgeoms = GEOSGetNumGeometries(g3) + * gout = GEOSGetGeometryN(g3, 0) */ - __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); + __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); + if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":180 - * elif typeid == GEOS_MULTILINESTRING: - * numgeoms = GEOSGetNumGeometries(g3) - * gout = GEOSGetGeometryN(g3, 0) # <<<<<<<<<<<<<< - * b = _get_coords(gout) - * p = LineString(b) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":180 + * p = Polygon(b) + * elif typeid == GEOS_MULTILINESTRING: + * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) */ - __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0); + __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":181 - * numgeoms = GEOSGetNumGeometries(g3) - * gout = GEOSGetGeometryN(g3, 0) - * b = _get_coords(gout) # <<<<<<<<<<<<<< - * p = LineString(b) - * else: + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":181 + * elif typeid == GEOS_MULTILINESTRING: + * numgeoms = GEOSGetNumGeometries(g3) + * gout = GEOSGetGeometryN(g3, 0) # <<<<<<<<<<<<<< + * b = _get_coords(gout) + * p = LineString(b) */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_3; - __pyx_3 = 0; + __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":182 - * gout = GEOSGetGeometryN(g3, 0) - * b = _get_coords(gout) - * p = LineString(b) # <<<<<<<<<<<<<< - * else: - * type = PyString_FromString(GEOSGeomType(g3)) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":182 + * numgeoms = GEOSGetNumGeometries(g3) + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) # <<<<<<<<<<<<<< + * p = LineString(b) + * else: */ - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_3; - __pyx_3 = 0; - goto __pyx_L4; - } - /*else*/ { + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_b); + __pyx_v_b = __pyx_3; + __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":184 - * p = LineString(b) - * else: - * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< - * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) - * GEOSGeom_destroy(g3) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":183 + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) + * p = LineString(b) # <<<<<<<<<<<<<< + * else: + * type = PyString_FromString(GEOSGeomType(g3)) */ - __pyx_4 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_type); - __pyx_v_type = __pyx_4; - __pyx_4 = 0; + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_v_b); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; + Py_DECREF(__pyx_v_p); + __pyx_v_p = __pyx_3; + __pyx_3 = 0; + goto __pyx_L5; + } + /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":185 - * else: - * type = PyString_FromString(GEOSGeomType(g3)) - * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< - * GEOSGeom_destroy(g3) - * return p + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":185 + * p = LineString(b) + * else: + * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< + * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) */ - __pyx_3 = PyNumber_Remainder(__pyx_kp_5, __pyx_v_type); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); - __pyx_3 = 0; - __pyx_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} - } - __pyx_L4:; + __pyx_4 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_type); + __pyx_v_type = __pyx_4; + __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":186 - * type = PyString_FromString(GEOSGeomType(g3)) - * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) - * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< - * return p + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":186 + * else: + * type = PyString_FromString(GEOSGeomType(g3)) + * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< + * GEOSGeom_destroy(g3) + * return p + */ + __pyx_3 = PyNumber_Remainder(__pyx_kp_5, __pyx_v_type); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1;} + } + __pyx_L5:; + + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":187 + * type = PyString_FromString(GEOSGeomType(g3)) + * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< + * return p * */ - GEOSGeom_destroy(__pyx_v_g3); + GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":187 - * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) - * GEOSGeom_destroy(g3) - * return p # <<<<<<<<<<<<<< + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":188 + * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) + * return p # <<<<<<<<<<<<<< * * def intersects(self, BaseGeometry geom): */ - Py_INCREF(__pyx_v_p); - __pyx_r = __pyx_v_p; - goto __pyx_L0; + Py_INCREF(__pyx_v_p); + __pyx_r = __pyx_v_p; + goto __pyx_L0; + goto __pyx_L4; + } + __pyx_L4:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; @@ -1172,8 +1185,8 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":189 - * return p +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":190 + * return p * * def intersects(self, BaseGeometry geom): # <<<<<<<<<<<<<< * cdef GEOSGeom *g1, *g2 @@ -1187,9 +1200,9 @@ char __pyx_v_answer; PyObject *__pyx_r; char __pyx_1; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":192 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":193 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -1198,7 +1211,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":193 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":194 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -1207,7 +1220,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":194 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":195 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -1216,7 +1229,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":195 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":196 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -1226,7 +1239,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":196 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":197 * answer = GEOSIntersects(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -1240,7 +1253,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":198 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":199 * return True * else: * return False # <<<<<<<<<<<<<< @@ -1262,7 +1275,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":200 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":201 * return False * * def intersection(self, BaseGeometry geom): # <<<<<<<<<<<<<< @@ -1299,9 +1312,9 @@ __pyx_v_p = Py_None; Py_INCREF(Py_None); __pyx_v_pout = Py_None; Py_INCREF(Py_None); __pyx_v_type = Py_None; Py_INCREF(Py_None); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":204 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":205 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -1310,7 +1323,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":205 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":206 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -1319,7 +1332,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":206 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":207 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -1328,7 +1341,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":207 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":208 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -1337,7 +1350,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":208 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":209 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1347,42 +1360,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":209 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":210 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = Polygon(b) * pout = [p] */ - __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":210 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":211 * if typeid == GEOS_POLYGON: * b = _get_coords(g3) * p = Polygon(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_LINESTRING: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":211 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":212 * b = _get_coords(g3) * p = Polygon(b) * pout = [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -1391,7 +1404,7 @@ goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":212 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":213 * p = Polygon(b) * pout = [p] * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< @@ -1401,42 +1414,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":213 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":214 * pout = [p] * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = LineString(b) * pout = [p] */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":214 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":215 * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) * p = LineString(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":215 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":216 * b = _get_coords(g3) * p = LineString(b) * pout = [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -1445,7 +1458,7 @@ goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":216 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":217 * p = LineString(b) * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< @@ -1455,7 +1468,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":217 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":218 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1464,19 +1477,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":218 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":219 * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = ((PyObject *)__pyx_3); __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":219 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":220 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1485,7 +1498,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":220 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":221 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1494,48 +1507,48 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":221 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":222 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = Polygon(b) * pout.append(p) */ - __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":222 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":223 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = Polygon(b) # <<<<<<<<<<<<<< * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":223 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":224 * b = _get_coords(gout) * p = Polygon(b) * pout.append(p) # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_3 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":224 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":225 * p = Polygon(b) * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< @@ -1545,7 +1558,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":225 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":226 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1554,19 +1567,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":226 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":227 * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = ((PyObject *)__pyx_2); __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":227 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geoslib.pyx":228 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1575,7 +1588,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/... [truncated message content]
Revision: 6019 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6019&view=rev Author: mdboom Date: 2008年08月11日 13:01:47 +0000 (2008年8月11日) Log Message: ----------- Snapping bug in last commit. Modified Paths: -------------- trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年08月11日 12:48:50 UTC (rev 6018) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年08月11日 13:01:47 UTC (rev 6019) @@ -387,7 +387,7 @@ double x0, y0, x1, y1; unsigned code; - if (!path.should_simplify() || path.total_vertices() > 15) + if (path.total_vertices() > 15) return false; code = path.vertex(&x0, &y0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6018 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6018&view=rev Author: mdboom Date: 2008年08月11日 12:48:50 +0000 (2008年8月11日) Log Message: ----------- Does simplify paths when NaN/inf is present. Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/path.py trunk/matplotlib/src/_backend_agg.cpp trunk/matplotlib/src/_path.cpp trunk/matplotlib/src/agg_py_path_iterator.h Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008年08月11日 07:09:16 UTC (rev 6017) +++ trunk/matplotlib/CHANGELOG 2008年08月11日 12:48:50 UTC (rev 6018) @@ -1,3 +1,9 @@ +2008年08月11日 Fix more bugs in NaN/inf handling. In particular, path simplification + (which does not handle NaNs or infs) will be turned off automatically + when infs or NaNs are present. Also masked arrays are now converted + to arrays with NaNs for consistent handling of masks and NaNs + - MGD and EF + ================================================================= 2008年08月03日 Released 0.98.3 at svn r5947 Modified: trunk/matplotlib/lib/matplotlib/path.py =================================================================== --- trunk/matplotlib/lib/matplotlib/path.py 2008年08月11日 07:09:16 UTC (rev 6017) +++ trunk/matplotlib/lib/matplotlib/path.py 2008年08月11日 12:48:50 UTC (rev 6018) @@ -56,6 +56,11 @@ :class:`Path` objects, as an optimization, do not store a *codes* at all, but have a default one provided for them by :meth:`iter_segments`. + + Note also that the vertices and codes arrays should be treated as + immutable -- there are a number of optimizations and assumptions + made up front in the constructor that will not change when the + data changes. """ # Path codes @@ -84,46 +89,29 @@ dimension. If *codes* is None, *vertices* will be treated as a series of - line segments. If *vertices* contains masked values, the - resulting path will be compressed, with ``MOVETO`` codes - inserted in the correct places to jump over the masked - regions. + line segments. + + If *vertices* contains masked values, they will be converted + to NaNs which are then handled correctly by the Agg + PathIterator and other consumers of path data, such as + :meth:`iter_segments`. """ if ma.isMaskedArray(vertices): - is_mask = True - mask = ma.getmask(vertices) + vertices = vertices.astype(np.float_).filled(np.nan) else: - is_mask = False vertices = np.asarray(vertices, np.float_) - mask = ma.nomask if codes is not None: codes = np.asarray(codes, self.code_type) assert codes.ndim == 1 assert len(codes) == len(vertices) - # The path being passed in may have masked values. However, - # the backends (and any affine transformations in matplotlib - # itself), are not expected to deal with masked arrays, so we - # must remove them from the array (using compressed), and add - # MOVETO commands to the codes array accordingly. - if is_mask: - if mask is not ma.nomask: - mask1d = np.logical_or.reduce(mask, axis=1) - gmask1d = np.invert(mask1d) - if codes is None: - codes = np.empty((len(vertices)), self.code_type) - codes.fill(self.LINETO) - codes[0] = self.MOVETO - vertices = vertices[gmask1d].filled() # ndarray - codes[np.roll(mask1d, 1)] = self.MOVETO - codes = codes[gmask1d] # np.compress is much slower - else: - vertices = np.asarray(vertices, np.float_) - assert vertices.ndim == 2 assert vertices.shape[1] == 2 + self.should_simplify = (codes is None and + np.all(np.isfinite(vertices)) and + len(vertices) >= 128) self.codes = codes self.vertices = vertices Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年08月11日 07:09:16 UTC (rev 6017) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年08月11日 12:48:50 UTC (rev 6018) @@ -387,7 +387,7 @@ double x0, y0, x1, y1; unsigned code; - if (path.total_vertices() > 15) + if (!path.should_simplify() || path.total_vertices() > 15) return false; code = path.vertex(&x0, &y0); @@ -420,11 +420,6 @@ return true; } -template<class Path> -bool should_simplify(Path& path) { - return !path.has_curves() && path.total_vertices() >= 128; -} - Py::Object RendererAgg::copy_from_bbox(const Py::Tuple& args) { //copy region in bbox to buffer and return swig/agg buffer object @@ -938,7 +933,7 @@ trans *= agg::trans_affine_scaling(1.0, -1.0); trans *= agg::trans_affine_translation(0.0, (double)height); bool snap = should_snap(path, trans); - bool simplify = should_simplify(path) && !face.first; + bool simplify = path.should_simplify() && !face.first; transformed_path_t tpath(path, trans); simplify_t simplified(tpath, snap, simplify, width, height); @@ -1236,6 +1231,10 @@ inline unsigned total_vertices() { return 5; } + + inline bool should_simplify() { + return false; + } }; public: Modified: trunk/matplotlib/src/_path.cpp =================================================================== --- trunk/matplotlib/src/_path.cpp 2008年08月11日 07:09:16 UTC (rev 6017) +++ trunk/matplotlib/src/_path.cpp 2008年08月11日 12:48:50 UTC (rev 6018) @@ -1120,7 +1120,7 @@ double width = Py::Float(args[2]); double height = Py::Float(args[3]); - bool simplify = !path.has_curves() && width != 0.0 && height != 0.0; + bool simplify = path.should_simplify() && width != 0.0 && height != 0.0; transformed_path_t tpath(path, trans); simplify_t simplified(tpath, false, simplify, width, height); Modified: trunk/matplotlib/src/agg_py_path_iterator.h =================================================================== --- trunk/matplotlib/src/agg_py_path_iterator.h 2008年08月11日 07:09:16 UTC (rev 6017) +++ trunk/matplotlib/src/agg_py_path_iterator.h 2008年08月11日 12:48:50 UTC (rev 6018) @@ -15,6 +15,7 @@ PyArrayObject* m_codes; size_t m_iterator; size_t m_total_vertices; + bool m_should_simplify; public: PathIterator(const Py::Object& path_obj) : @@ -22,6 +23,7 @@ { Py::Object vertices_obj = path_obj.getAttr("vertices"); Py::Object codes_obj = path_obj.getAttr("codes"); + Py::Object should_simplify_obj = path_obj.getAttr("should_simplify"); m_vertices = (PyArrayObject*)PyArray_FromObject (vertices_obj.ptr(), PyArray_DOUBLE, 2, 2); @@ -38,6 +40,7 @@ throw Py::ValueError("Invalid codes array."); } + m_should_simplify = bool(Py::Int(should_simplify_obj)); m_total_vertices = m_vertices->dimensions[0]; } @@ -100,9 +103,9 @@ return m_total_vertices; } - inline bool has_curves() + inline bool should_simplify() { - return m_codes; + return m_should_simplify; } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6017 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6017&view=rev Author: efiring Date: 2008年08月11日 07:09:16 +0000 (2008年8月11日) Log Message: ----------- Eliminate duplicate Path instantiation Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/transforms.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008年08月10日 23:49:21 UTC (rev 6016) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008年08月11日 07:09:16 UTC (rev 6017) @@ -1282,8 +1282,9 @@ line._remove_method = lambda h: self.lines.remove(h) def _update_line_limits(self, line): - xydata = line.get_xydata() - self.update_datalim( xydata ) + self.dataLim.update_from_path(line.get_path(), + self.ignore_existing_data_limits) + self.ignore_existing_data_limits = False def add_patch(self, p): """ @@ -1307,12 +1308,11 @@ # the auto-scaling if isinstance(p, mpatches.Rectangle) and (p.get_width()==0. or p.get_height()==0.): return - vertices = p.get_patch_transform().transform(p.get_path().vertices) if p.get_data_transform() != self.transData: transform = p.get_data_transform() + self.transData.inverted() xys = transform.transform(vertices) - + # Something is wrong--xys is never used. self.update_datalim(vertices) def add_table(self, tab): @@ -1327,6 +1327,8 @@ def relim(self): 'recompute the data limits based on current artists' + # Collections are deliberately not supported (yet); see + # the TODO note in artists.py. self.dataLim.ignore(True) self.ignore_existing_data_limits = True for line in self.lines: Modified: trunk/matplotlib/lib/matplotlib/transforms.py =================================================================== --- trunk/matplotlib/lib/matplotlib/transforms.py 2008年08月10日 23:49:21 UTC (rev 6016) +++ trunk/matplotlib/lib/matplotlib/transforms.py 2008年08月11日 07:09:16 UTC (rev 6017) @@ -786,12 +786,12 @@ xy = np.hstack((x.reshape((len(x), 1)), y.reshape((len(y), 1)))) return self.update_from_data_xy(xy, ignore) - def update_from_data_xy(self, xy, ignore=None): + def update_from_path(self, path, ignore=None): """ Update the bounds of the :class:`Bbox` based on the passed in data. - xy: a numpy array of 2D points + path: a Path instance ignore: - when True, ignore the existing bounds of the Bbox. @@ -801,20 +801,33 @@ if ignore is None: ignore = self._ignore - if len(xy) == 0: - return - xym = ma.masked_invalid(xy) # maybe add copy=False - if (xym.count(axis=1)!=2).all(): - return - points, minpos, changed = update_path_extents( - Path(xym), None, self._points, self._minpos, ignore) + path, None, self._points, self._minpos, ignore) if changed: self._points = points self._minpos = minpos self.invalidate() + + def update_from_data_xy(self, xy, ignore=None): + """ + Update the bounds of the :class:`Bbox` based on the passed in + data. + + xy: a numpy array of 2D points + + ignore: + - when True, ignore the existing bounds of the Bbox. + - when False, include the existing bounds of the Bbox. + - when None, use the last value passed to :meth:`ignore`. + """ + if len(xy) == 0: + return + + path = Path(xy) + self.update_from_path(path, ignore=ignore) + def _set_x0(self, val): self._points[0, 0] = val self.invalidate() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.