Opened 17 years ago
Closed 17 years ago
#1888 closed defect (fixed)
ExportToJson GeometryCollection handling
Reported by: | crschmidt | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.0 |
Component: | PythonBindings | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmadam |
Description (last modified by )
if self.GetGeometryType() == ogr.wkbGeometryCollection or \ self.GetGeometryType() == ogr.wkbGeometryCollection25D: geometries = [] geom_count = geometry.GetGeometryCount() for g in range(geom_count): geom = self.GetGeometryRef(g) geometries.append(geom.ExportToJson()) output = {'type': types[self.GetGeometryType()], 'geometries': geometries} else: output = {'type': types[geometry.GetGeometryType()], 'coordinates': get_coordinates(geometry)}
Attachments (1)
Change History (6)
comment:1 by , 17 years ago
comment:3 by , 17 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 1.5.0 |
comment:4 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The code I pasted was cargo culted from an external ogrhelpers module -- not written internally. This patch is against the actual ogr code, and is tested to after a 'python setup.py install' from trunk plus this patch.
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I think we're done with this after r12335.
Note:
See TracTickets
for help on using tickets.
Needs a \ after the or.