Load GeoJSON file into Apache CouchDB

I am working on Windows10 and tried to load a geojson file into my couchdb via the "curl" command and a POST request in the cmd which looks like that:

C:Program FilescURLbin>curl -d @path-to-my-datadata.geojson -H "Content-type: application/json" -X POST http://127.0.0.1:5984/_utils/database.html?-dbName-

and then I get the following error:

{"error":"method_not_allowed","reason":"Only GET,HEAD allowed"}

On http://couchdb-13.readthedocs.org/en/latest/api-basics/ it is said, that "If you use the an unsupported HTTP request type with a URL that does not support the specified type, a 405 error will be returned, listing the supported HTTP methods." When I try that with a PUT request, I get the same error.

I validated the json with jsonlint so this should not be the problem. I tried several tutorials like "Three Steps to CouchDB Heaven …" or "Export & Import a Database with CouchDB" but none of them seems to work.

So I am not sure, where the problem is. Do I need to make changes in my geojson file, or something else?

thanks for your help


The needed curl command just looks like that:

curl -H "Content-Type: application/json" -X POST http://localhost:5984/db -d @C:UsersNameDesktopdata.geojson

链接地址: http://www.djcxy.com/p/48536.html

上一篇: 无法打开couchdb

下一篇: 将GeoJSON文件加载到Apache CouchDB中