Hi,
I've struggled with the best way to "replace" the data for a shape file
layer in Geoserver.  I receive new SHP files several times a year.  The
safest method I've found, if I want to keep the same layer name, is to
do the following:
1)  put the new SHP files into a new folder under the data_dir.  Each
new folder includes the date/month in the name.  Like ShpFiles_2016_12
2)  create a new store with the same name as the folder I put the files
in.

3)  rename the current layer.  For WMS queries that display this layer,
this layer is actually part of a Layer Group.  So renaming it really has
little effect on those using the Layer Group to view it.  However there
are Feature queries that use the actual layer name.  These will stop
working temporarily when I rename it.
4)  Add new layer, selecting the new store, and the new shp file, and
set the layer name to the original layer name.  Calculate the bounds,
and save.  Now the Feature queries will work, but the layer groups are
still pointing to the old layer...
5)  Now I have to go to all the Layer Groups that contain the old,
renamed layer, edit them, add the newly created layer, move it to the
right location in the hierarchy, then delete the older renamed layer,
and save.  Do this for each Layer Group that references the older,
renamed layer.
6) When I'm sure the older layers/stores are no longer referenced, I can
then delete them from Geoserver and delete the files from the data_dir.

So my main question: Is there an easy way to find references of a Layer
(or a Style or a Store or a Layer Group), so I don't have to hunt them
down?

And then, if not, perhaps this becomes an enhancement request.  And
perhaps reposted to geoserver-devel?

>From a UI perspective, I would like to select the layer (or in the long
run, a Style, a Store, or a Layer Group as well), and in addition to
seeing the Data, Publishing, Dimensions, and Tile Caching tabs at the
top, also include a "References" tab.  Go to this tab, and see the other
things that reference it.  Perhaps even make these references a link, to
go edit that object (to manually remove the reference, perhaps...).  For
a Layer, it should include all Layer Groups that include it.  Perhaps
any special security settings that reference it as well.  So I know that
I need to go update these if I'm replacing the layer.  For Stores -
perhaps it would show all published layers (even though this is pretty
easy to find out in the Layer list).  Styles should also list what Layer
Groups or Layers reference them.  (That's not so easy to figure out)  

It would be fantastic to have Geoserver help me determine that an object
is no longer referenced by others before I delete it.


Brian Biales
Telepartner International


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to