Opened 16 years ago

Closed 16 years ago

#2031 closed enhancement (fixed)

CreateGeometryFromJson/ExportToJson

Reported by: hobu Owned by: Mateusz Łoskot
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 (7)

comment:1 by hobu, 16 years ago

Milestone: 1.5.0
Owner: changed from warmerdam to Mateusz Łoskot
Type: defectenhancement
Version: unspecifiedsvn-trunk

comment:2 by hobu, 16 years ago

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.

comment:3 by Mateusz Łoskot, 16 years ago

Component: defaultOGR_SF
Keywords: geojson json added
Status: newassigned

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.

comment:4 by hobu, 16 years ago

Added to the swig bindings in r13154.

comment:5 by hobu, 16 years ago

Also, r13158 and r13160

comment:6 by Mateusz Łoskot, 16 years ago

Hobu, are we ready to close this ticket?

comment:7 by hobu, 16 years ago

Resolution: fixed
Status: assignedclosed

Yep. Things appear to be working fairly well.

Note: See TracTickets for help on using tickets.