[gdal-dev] Convert json point to OGRPoint

Mateusz Loskot mateusz at loskot.net
Fri Dec 11 03:12:56 PST 2015


On 11 December 2015 at 12:04, Gane R <gane.prog at gmail.com> wrote:
> Q1. exportJson converts Geometry to Json, I am looking a function to convert
> the json string to OGRPoint.

C API function is named OGR_G_CreateGeometryFromJson


> Q2. String returned by exportJson should be compulsorly freed using CPLFree
> or will be freed automatically.

"The returned string should be freed with CPLFree() when no longer required."
from OGR_G_ExportToJson documentation at http://www.gdal.org/ogr__api_8h.html

Best regards,
-- 
Mateusz  Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list