>
> in post_layer_save() we are pulling in metadata from GeoServer and
> GeoNetwork, then saving again?  Why not do this in a pre_layer_save hook?
>

I tried many ways before being able to make this work, here is the
breakdown:

1. We need to save the layer in geoserver before being able to get the
bounding box and the other data that geoserver generates.

2. We need to save the layer in geonetwork before being able to pull data
from geonetwork, in this case distribution_url and some of the other data
set in the template from geoserver and layer info.

3. We need to have the poc defined before saving to geonetwork or the record
would be invalid ... but ... we need to have the layer instance saved to the
database before being able to assign a poc (requiring a post_save hook).

I am open to suggestions as I played with pre_init, post_init, pre_save,
post_save hooks until the letters in the screen became ants and started
dancing around. An outsider pair of eyes are always fresher.

Ariel.

Reply via email to