Getting an error in Geonode when adding a new layer from a Geopackage store

by Vijay   Last Updated August 14, 2019 08:22 AM - source

I am trying to publish a new layer from a Geopackage store which I created using the following code

cat = Catalog("http://localhost:8080/geoserver/rest/")
geoserver_workspace = cat.get_workspace("myworkspace")

ds = cat.create_datastore(store_name, geoserver_workspace)

ds.connection_parameters.update(database='~/Desktop/study001_ins00.gpkg',
                                    dbtype='geopkg')

The above code does create a store in the Geoserver but the path of the database which I am giving is on local hard drive and not on the server.

This creates a problem when I manually try to publish a new layer using the above store

Could not list layers for this store, an error occurred retrieving them: null

Can some one help me in giving the right parameters to connection_parameters.update() function so that the store is correctly created in the geoserver location from the local drive.

I am using the gsconfig Python library as a wrapper to accessing Geoserver REST API https://github.com/ingenieroariel/gsconfig.py

When using shp file, the store is created in the Geoserver at file:/workshop/geonode/geoserver/data/data/myworkspace/study001_ins00/ using the create_featurestore() function

Geoserver Version is 2.1.5.1.



Related Questions


Geoserver REST API - Change styles on the fly

Updated December 26, 2017 21:22 PM

goeserver REST api for NetCDF in Python

Updated September 11, 2019 08:22 AM

Geoserver Java REST API

Updated January 16, 2018 08:22 AM