5

How can I determine the source of an existing layer in GeoServer?

To illustrate, I have a Data Store pointing to a PostgreSQL database, and I Publish a table in this PG database to create a GeoServer layer.

The layer creation page shows the Data Store and PG table name, but I rename the layer so that the layer name no longer matches the PG table name:

enter image description here

After the layer has been published, reopening the layer's page in GeoServer no longer references the actual table name in PostgreSQL:

enter image description here

How can I trace the fact that the layer blah is sourced from the table aus_supplychain_motor_webmap_qaa_clms?

7

The information is available in the feature type. While I haven't found it using the UI, you can use the REST interface to see it:

http://localhost/geoserver/rest/workspaces/<workspaceName>/datastores/<DataStoreName>/featuretypes/<layerName>.xml

ex: http://localhost:8080/geoserver/rest/workspaces/odltest/datastores/DBcan/featuretypes/roads_test.xml

Alternatively, you can browse to /<geoserver_data>/workspaces/<workspacename>/<store name>/<layer name> and read the file featuretype.xml, specificaly the field <nativeName> ex:

<featureType>
  <id>FeatureTypeInfoImpl--1e400972:15f5b3e83e0:-7ffd</id>
  <name>roads_test</name>
  <nativeName>roads</nativeName>
[...]

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.