[ckan-dev] Help with GEOJSON upload

Mads R. Havmand mhv at energinet.dk
Wed Sep 12 05:59:20 UTC 2018


Are you absolutely sure there’s nothing in the logs? “500 Internal Server Error” usually means that an exception was thrown and a stacktrace usually follows.

Venlig hilsen

Mads R. Havmand
IT Enterprise Information Mgmt.
+4561149549
mhv at energinet.dk<mailto:mhv at energinet.dk>


Fra: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] På vegne af Vineet Jain
Sendt: 11. september 2018 18:48
Til: ckan-dev at lists.okfn.org
Emne: [ckan-dev] Help with GEOJSON upload

Hi

I am trying to upload a GEOJSON to ckan datastore using datastore API. But i keep on getting error as below:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</

There is nothing helpful in the log. I am trying to call datastore_create.
Sample payload is

                      {
                      "resource": {
                                            "package_id": "city-wards",
                                            "name": "City Wards",
                                            "format":"json"
                      },
                      "fields": [{
                                            "id": "type",
                                            "type":  "varchar"
                      }, {
                                            "id": "geometry",
                                            "type": "json"
                      }, {
                                            "id": "properties",
                                            "type": "json"
                      }],
                      "records": {
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Dinagat Islands"
  }
}}

Please let me kniw if there is any issue with the payload or if I need to do something else to allow to upload GEOJSON to datastore. currently using CKAN 2.8 and postgres 9.6 with POSTGIS.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20180912/c90f88a3/attachment-0002.html>


More information about the ckan-dev mailing list