I tried to upload a zipped shapefile to GeoServer using CURL.

curl -v -u username:password -XPUT -H "Content-type: application/zip" --data-binary @D:\curl\bin\roads.zip https://DOMAIN/geoserver/rest/workspaces/geonode/datastores/my_geonode_data/file.shp

This above command works fine.

But I can't seem to upload a GeoJSON file to GeoServer.

 curl -v -u username:password -XPUT -H "Content-type: application/json" --data-binary @D:\curl\bin\countries.geojson https://DOMAIN/geoserver/rest/workspaces/geonode/datastores/my_geonode_data/featuretypes

I am attaching the error in geoserver.log. But the GeoJSON is not uploaded. I can't see it in the uploaded layers. Am I correct in the CURL command? Is the endpoint (URL address) okay?

enter image description here


1 Answer 1


By default GeoServer doesn't support GeoJSON as a storage format because it is a text format with no indexing.

It would be possible for an expert to add the GeoTools gt-geojsondatastore module to GeoServer to add this support but it would be very unwise for a production service as that jar is currently unsupported and it would be very slow.

You should convert your data to a better format such as a PostGIS data base or GeoPackage and upload that instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.