[ckan-dev] Cannot upload GeoJSON [and JSON] resources do Datastore
Lars Johan Ilver
LJI at odense.dk
Wed Aug 10 11:37:07 UTC 2016
Hi.
Try to validate your geoJSON using some online utility like http://geojsonlint.com/ before uploading to CKAN. It will return a more helpful error message.
/Lars
Fra: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] På vegne af Sovello Hildebrand Mgani
Sendt: 10. august 2016 12:28
Til: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Emne: Re: [ckan-dev] Cannot upload GeoJSON [and JSON] resources do Datastore
Thanks Adria!
I have managed to set that up however I face one challenge, when I want to view the map (for the dataset) I get an error: An error occurred: parsererror SyntaxError: Unexpected token y in JSON at position 1 I can't easily troubleshoot as am still new to CKAN.
(I have noticed a few issues like flattening a GeoJSON to CSV before uploading isn't intuitive, and after flattening everything goes different from the Documentation. [For a beginner that's not like me, it's not easy].)
Is there a different IRC channel from #ckan that has active users?
Thanks.
2016-08-10 12:02 GMT+03:00 Adrià Mercader <adria.mercader at okfn.org<mailto:adria.mercader at okfn.org>>:
Hi Sovello,
If you want to visualize GeoJSON files have a look at
https://github.com/ckan/ckanext-geoview, which has view plugins for
exactly that
Cheers,
Adrià
On 10 August 2016 at 09:53, Sovello Hildebrand Mgani
<sovellohpmgani at gmail.com<mailto:sovellohpmgani at gmail.com>> wrote:
> Thanks Mathew for the pointer,
>
> That did the trick of uploading to the datastore. However I want to be able
> to visualize some data on maps using the ckanext_mapviews extension which
> seems not to work. It fails with the error that the resource is not JSON
> Serializable.
> I would appreciate if you point me to the right direction how to visualize
> maps on CKAN!
>
> Thanks
>
> 2016-08-10 10:59 GMT+03:00 Matthew Fullerton <matt.fullerton at gmail.com<mailto:matt.fullerton at gmail.com>>:
>>
>> Hi Sovello,
>> The datastore/datapusher is for tabular data (CSV, XLS, etc.), and not for
>> tree-like data like JSON.
>>
>> You could look into 'flattening' your JSON to CSV, e.g.
>> https://konklone.io/json/
>>
>> Best,
>> Matt
>>
>> On 10 August 2016 at 09:53, Sovello Hildebrand Mgani
>> <sovellohpmgani at gmail.com<mailto:sovellohpmgani at gmail.com>> wrote:
>>>
>>> Hi all!
>>> Am deploying CKAN for a project in Tanzania and had trouble uploading
>>> GeoJSON (and JSON) files through to the DataStore.
>>>
>>> It complains about Invalid Data Fields and Datapusher returns a HTTP
>>> Error Code 409.
>>>
>>> I have searched and looks like it's a common problem but didn't get a
>>> clear solution as to what I should do. I can use the API resource_create()
>>> without problems, only when I upload to Data Store that I get errors.
>>>
>>> I would appreciate if you can point me to a resource that I can go
>>> through or if you can help directly.
>>>
>>> Thanks in Advance!
>>>
>>> --
>>> :: Sovello Hildebrand Mgani ::
>>>
>>>
>>>
>>> --If you teach man to fish, you'll feed him a lifetime--
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>>
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>
>
>
> --
> :: Sovello Hildebrand Mgani ::
>
>
>
> --If you teach man to fish, you'll feed him a lifetime--
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
--
:: Sovello Hildebrand Mgani ::
--If you teach man to fish, you'll feed him a lifetime--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160810/6b338880/attachment-0003.html>
More information about the ckan-dev
mailing list