[postgis-devel] json-c for postgis

Kashif Rasul kashif.rasul at gmail.com
Mon Sep 5 03:26:09 PDT 2011


Dear Strk

thanks for reply. To answer your questions.

1. its licensed under the MIT license.

2. Its about 350K and can be included in the postgis source. I know that
Geos does this with a patched version of json-c which has an extra method to
specify the precision when adding a double number to an object. If we go
down this route, I would say we use this version as well.

3. I think for for output I would leave the implementation as it is, even
though I have converted it to use json-c and the unit tests all pass. But
for the ST_GeomFromGeoJSON which is what I am working on now, it would make
the code a lot more concise and readable to use json-c rather than doing the
string concats, searching for object types and parsing etc.  I guess for
outputs its easier since we just need to construct the corresponding xml or
json string, but for input, one would need a lib. dependence. or some
parser.

I hope this helps
Kashif

On Aug 17, 2011, at 1:58 PM, Sandro Santilli wrote:

> [postgis-devel included]
>
> On Tue, Aug 16, 2011 at 12:55:35PM +0200, Kashif Rasul wrote:
>>
>> I am trying to tackle ticket:
>>
>> http://trac.osgeo.org/postgis/ticket/376
>>
>> by using the json-c library for postgis. Do you think thats a good
>> idea? One would need to have json-c as a dependency. However it will
>> make it easier to add geojson support.
>
> I dunno much about json-c library.
> Which license is it distributed with ?
> How big is it ? Can we include it rather than linking it ?
> We don't want to depend on anything which isn't packaged
> on Debian stable.
>
> Are you sure it's worth a library ? KML and GML outputs are
> done w/out any external library...
>
> --strk;
>
>  ()   Free GIS & Flash consultant/developer
>  /\   http://strk.keybit.net/services.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110905/5fdabb7b/attachment.html>


More information about the postgis-devel mailing list