Ticket #2031 (closed enhancement: fixed)

Opened 8 months ago

Last modified 8 months ago

CreateGeometryFromJson/ExportToJson

Reported by: hobu Assigned to: mloskot
Priority: normal Milestone: 1.5.0
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: geojson json
Cc:

Description

Add GeoJSON i/o for OGRGeometry following the model that GML uses.

char* OGRGeometry::ExportToJson?() -- char* OGR_G_ExportToJson(OGRGeometryH*)

OGRGeometry* CreateGeometryFromJson?(const char* json) -- OGRGeometryH OGR_G_CreateGeometryFromJson(const char* json)

Change History

11/28/07 01:37:21 changed by hobu

  • owner changed from warmerdam to mloskot.
  • version changed from unspecified to svn-trunk.
  • type changed from defect to enhancement.
  • milestone set to 1.5.0.

11/28/07 01:41:55 changed by hobu

Note that we have to *remove* the methods of the same names from the Python bindings that were implemented in Python. This will be much much faster.

11/29/07 02:01:51 changed by mloskot

  • keywords set to geojson json.
  • status changed from new to assigned.
  • component changed from default to OGR_SF.

I added GeoJSON features to C API:

  • OGR_G_ExportToJson
  • OGR_G_CreateGeometryFromJson

and to C++ API:

  • OGRGeometry::exportToJson

in trunk (r13143).

Missing feature but requested: OGRGeometry* CreateGeometryFromJson??() - unclear where this function should be added, OGRGeometryFactory, or OGRGeometry.

11/29/07 13:03:11 changed by hobu

Added to the swig bindings in r13154.

12/03/07 22:11:21 changed by hobu

Also, r13158 and r13160

12/04/07 05:43:08 changed by mloskot

Hobu, are we ready to close this ticket?

12/18/07 13:07:31 changed by hobu

  • status changed from assigned to closed.
  • resolution set to fixed.

Yep. Things appear to be working fairly well.