2

I use gsconfig in order to create a layer in geoserver. This works great but I have noticed that the title of the geoserver layer is the same as the name of the layer. Is there a way to pass the title name when creating the layer or edit the resource of the layer later with the correct title of the layer?

I use gsconfig 1.0.0.

This is what I do right now:

    cat = Catalog(settings.OGC_SERVER['default']['LOCATION'] + "rest", 'user', 'pass')
    ds = cat.get_store("my_store") 
    cat.publish_featuretype(new_table, ds, "EPSG:4326", srs="EPSG:4326")
1

It seems like that the gsconfig library doesn't takes as input parameter the title of the layer.

But alternatively you can use the get_resource() function to get the layers resource, edit the title and save it as:

cat = Catalog('localhost..', 'user', 'pass')
resource = cat.get_resource("layer_name", workspace="my_workspace")
resource.title = "that's my title"
cat.save(resource)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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