[geos-devel] RE: [GEOS] #468: Geometry breaks valid() and buffer(): "Assertion failed: (0), function query, file AbstractSTRtree.cpp, line 286"

Christopher DeMars chdemars at ucdavis.edu
Mon Aug 22 14:58:44 EDT 2011


I'm thinking that there must be some sort of conflict between the GEOS
and geodjango. Has the API changed significantly lately?

After installing the latest SVN release (3.4.0dev-CAPI-1.8.0), things
got worse, not better. Now no geometry will buffer, even super simple
example geometries from wikipedia's wkt entry.

Using two geometries from my dataset (attached as wkt), I ran through
the geodjango geos api.

Operations that seemed to work:
.empty
.geom_type
.num_coords
.num_geom
.hasz
.ring
.simple
.srid
.json
.ewkt
.hex
.hexewkb
.geojson
.ogr
.ewkb
.wkb
.contains(w2)
.crosses(w2)
.disjoint(w2)
.equals(w2)
.equals_exact(w2)
.intersects(w2)
.overlaps(w2)
.touches(w2)
.within(w2)
.relate(w2)
.boundary
.centroid
.convex_hull
.envelope
.area
.clone
.length
.prepared
.srs


Worked, but returned a bogus answer
In [17]: w1.distance(w2)
Out[17]: 1.7976931348623157e+308


Type errors:
.kml
GEOS_ERROR: Argument is not a Polygon
GEOS_ERROR: Argument is not a Polygon
w1.difference(w2)
GEOS_ERROR: UnsupportedOperationException: GeometryGraph::add(Geometry
*): unknown geometry type: N4geos4geom12MultiPolygonE
 w1.intersection(w2)
GEOS_ERROR: UnsupportedOperationException: GeometryGraph::add(Geometry
*): unknown geometry type: N4geos4geom12MultiPolygonE
w1.sym_difference(w2)
GEOS_ERROR: UnsupportedOperationException: GeometryGraph::add(Geometry
*): unknown geometry type: N4geos4geom12MultiPolygonE
 w1.union(w2)
GEOS_ERROR: UnsupportedOperationException: GeometryGraph::add(Geometry
*): unknown geometry type: N4geos4geom12MultiPolygonE
w1.point_on_surface
GEOS_ERROR: UnsupportedOperationException: GeometryGraph::add(Geometry
*): unknown geometry type: N4geos4geom10LineStringE
GEOS_ERROR: UnsupportedOperationException: GeometryGraph::add(Geometry
*): unknown geometry type: N4geos4geom10LineStringE
w1.extent
GEOS_ERROR: Geometry must be a Point or LineString
GEOS_ERROR: Geometry must be a Point or LineString
w1.coords
GEOS_ERROR: Argument is not a Polygon
GEOS_ERROR: Argument is not a Polygon


Segfault:
w1.simplify()
Segmentation fault
w1.valid
Segmentation fault
w1.valid_reason
Segmentation fault
w1.buffer(20)
Segmentation fault


I guess I'll go bitch at the GeoDjango folks for a while until I can
get an exact reason why things are going fubar when translating from
django to geos.

Thanks for your time,
--Christopher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: w1fubar.wkt
Type: application/octet-stream
Size: 517 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20110822/0efb49c8/w1fubar-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: w2fubar.wkt
Type: application/octet-stream
Size: 1067 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20110822/0efb49c8/w2fubar-0001.obj


More information about the geos-devel mailing list