[ckan-dev] examples of GeoJson field data

Adrià Mercader adria.mercader at okfn.org
Tue Jan 8 15:10:16 UTC 2013


Done: https://github.com/okfn/recline/issues/304


Thanks,

Adrià

On 8 January 2013 14:06, Rufus Pollock <rufus.pollock at okfn.org> wrote:
> Hi Adria,
>
> Good spot. Can you file an issue reffing backend.csv.js on
> https://github.com/okfn/recline.
>
> Rufus
>
> On 8 January 2013 11:32, Adrià Mercader <adria.mercader at okfn.org> wrote:
>> Hi Pascal,
>>
>> The GeoJSON string field should be quoted and to be a valid json, the
>> object representation should have double quotes. The problem is that
>> the current Recline parser won't recognise the following (which is an
>> issue IMO):
>>
>> name,geom
>> Test, "{\"type\":\"Point\",\"coordinates\":[-1.1207,45.4874]}"
>>
>> The only way I got it working is using single quotes on the field, and
>> telling recline so when loading the dataset (You can test it in
>> http://explorer.datahub.io, which allows you to specify the text
>> delimiter)
>>
>> name,geom
>> Test, '{"type":"Point","coordinates":[-1.1207,45.4874]}'
>>
>> Unfortunately, the current CKAN integration with Recline does not
>> allow defining advanced options like the text delimiter, so I'm afraid
>> there isn't an easy fix around this.
>>
>> Perhaps Rufus has another approach that could work?
>>
>>
>> Adrià
>>
>>
>> On 8 January 2013 09:17,  <p.romain at cg33.fr> wrote:
>>> Hi,
>>>
>>> We are trying to take advantage of recline GeoJson capabilities to display
>>> geographical data on our CKAN instance.
>>> We transform the data from WKT to GeoJson but so far we have not been able
>>> to have working examples.
>>> I remember seeing some dataset using this feature but I can't find them
>>> anymore.
>>>
>>> A simple example with only one fied
>>>
>>> {"type":"Point","coordinates":[-1.1207,45.4874]}
>>>
>>> A more advanced example
>>>
>>> 3301,ARCACHON,XCAN01,{"type":"Polygon","coordinates":[[[-1.2043,44.6385],[-1.2014,44.6394],[-1.1964,44.6407],[-1.1959,44.6408],[-1.1952,44.6408],[-1.1946,44.6409],[-1.1944,44.6409]]]}
>>>
>>> On of the issue is the separator of fields normaly the comma which is part
>>> of the GeoJson syntax.
>>>
>>> Could you point me with example of resources using GeoJson fields in csv
>>> files ?
>>>
>>>
>>> Best,
>>> Pascal
>>> __________________________________________________________________
>>>
>>> Ce message et toutes les pièces jointes sont confidentiels et établis à
>>> l'intention exclusive de ses destinataires. Ce message ne constitue pas un
>>> document officiel. Seuls les documents revêtus de la signature du Président
>>> du Conseil Général ou d'un de ses délégataires sont de nature à engager le
>>> Département.
>>> Toute utilisation ou diffusion non autorisée est interdite. Tout message
>>> électronique est susceptible d'altération et le Département de la Gironde
>>> décline toute responsabilité au titre de ce message s'il a été altéré,
>>> déformé, falsifié.
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>>
>
>
>
> --
> Co-Founder, Open Knowledge Foundation
> Promoting Open Knowledge in a Digital Age
> http://www.okfn.org/ - http://blog.okfn.org/




More information about the ckan-dev mailing list