Using GeoServer, if you add a feature type bound to a SQL table that is empty, when you then populate that table no data shows up in layer preview. Clicking the "reload feature type" button corrects the problem. Is there any way to do this through the REST API, or some other way to automate it?

It looks like the resource reset command could achieve this, but it seems to do so for all stores. I would rather only do it for the store in question.


Short answer, this is not supported.

Longish answer, you can update yourself the featyretype bounds through the rest api with the new bounds that you can get from the DB.

| improve this answer | |
  • how do you reload featuretype through the rest api? please give geoserver-manager example? – Dariush Jan 10 '16 at 4:45
  • the easiest way is to get the XML for the featuretype, change the BBOX and post it again. – simogeo Jan 10 '16 at 21:47
  • @simogeo Would "posting the featuretype again as xml" mean, that a new featuretype is saved? I have an issue with updated geometries, that would not show up in the layer preview, until i reload the feature type via management interface. – hnrch Apr 19 '16 at 14:40

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.