[GeoNode-devel] Behavior of distribution_url, distribution_description?
becrevensten at alaska.edu
Fri Feb 12 11:43:41 PST 2016
Thanks for the information, Tom! To clarify my intent, I was hacking to
use these fields to drive a different front-end for publishing maps with
GeoNode, and here's how I was using the fields in that front-end:
What I need is two key/value pairs with a known key in each case that I can
reference in an API request for the layer (in our case, we're extending the
API with pull request  below). I'm unclear on where, via GeoNode's
layer editor (Home > Layers > Pick a layer > Edit > Metadata), I could add
that type of information -- or where, in general, to interact via the GUI
with the "rich metadata links model"?
Any guidance would be appreciated!
On Wed, Feb 10, 2016 at 5:38 PM, Tom Kralidis <tomkralidis at gmail.com> wrote:
> Hi Bruce: sorry for the delayed response, comments interleaved:
> On Fri, Feb 5, 2016 at 6:42 PM, Bruce Crevensten
> <becrevensten at alaska.edu> wrote:
> > I'm curious about the intended (and actual) behavior of the
> > and distribution_description metadata properties for layers.
> > I expected to be able to use GeoNode's layer editor (Layer > pick a
> layer >
> > Edit Layer > Metadata) in order to manage those fields, but I found that
> > behavior was somewhat unpredictable -- either it always reset the
> > distribution_url to a default GeoNode point, and the url_description
> > to "Web address (URL)", _or_ for some layers it's worked fine to edit
> > I can't discern the difference layers that I can edit and those I cannot,
> > and a colleague gets different behavior with the same layers I'm using.
> > I traced the relevant code to:
> > geonode/geonode/catalogue/models.py:
> > 112 if len(onlineresources) == 1:
> > 113 res = onlineresources
> > 114: instance.distribution_url = res.url
> > 115 instance.distribution_description = res.description
> > I'm unclear on how this `onlineresource` is getting set (appears to
> > by default, but not always?) and/or if the intent of the Metadata editor
> > to allow this to be overwritten -- and if so, is this a bug?
> distribution_url and distribution_description are autopopulated  from
> [a] GeoNode's metadata link objects or [b] derived from combining
> other objects in
> the absence of [a].
> Having said this, I believe these fields were in the codebase prior to
> rich metadata links model , and as such we should probably remove them.
> opened a ticket  to track this.
>  https://github.com/GeoNode/geonode/issues/2422
> > Thanks!
> > --
> > Bruce Crevensten
*Senior Software Engineer*
(SNAP) Scenarios Network for Alaska & Arctic Planning
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the geonode-devel