Opened 9 years ago
Closed 9 years ago
#25664 closed Bug (fixed)
`Point.dims` raises `GEOSException` during access
Reported by: | Sergey Fedoseev | Owned by: | Sergey Fedoseev |
---|---|---|---|
Component: | GIS | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In [3]: Point(0, 0).dims --------------------------------------------------------------------------- GEOSException Traceback (most recent call last) <ipython-input-3-e86d94f16a63> in <module>() ----> 1 Point(0, 0).dims /home/sergey/dev/django/django/contrib/gis/geos/geometry.pyc in dims(self) 246 def dims(self): 247 "Returns the dimension of this Geometry (0=point, 1=line, 2=surface)." --> 248 return capi.get_dims(self.ptr) 249 250 def normalize(self): /home/sergey/dev/django/django/contrib/gis/geos/libgeos.pyc in __call__(self, *args, **kwargs) 155 if self.func is None: 156 self.func = self.get_func(*self.args, **self.kwargs) --> 157 return self.func(*args, **kwargs) 158 159 def get_func(self, *args, **kwargs): /home/sergey/dev/django/django/contrib/gis/geos/prototypes/threadsafe.pyc in __call__(self, *args) 54 # Call the threaded GEOS routine with pointer of the context handle 55 # as the first argument. ---> 56 return self.cfunc(self.thread_context.handle.ptr, *args) 57 else: 58 return self.cfunc(*args) /home/sergey/dev/django/django/contrib/gis/geos/prototypes/errcheck.pyc in check_zero(result, func, cargs) 88 "Error checking on routines that should not return 0." 89 if result == 0: ---> 90 raise GEOSException('Error encountered in GEOS C function "%s".' % func.__name__) 91 else: 92 return result GEOSException: Error encountered in GEOS C function "GEOSGeom_getDimensions_r".
Change History (3)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Has patch: | set |
---|
Note:
See TracTickets
for help on using tickets.
PR -- https://github.com/django/django/pull/5536