[GeoNode-devel] Non ISO Metadata Topic Categories and Geonode Behavior

Patrick Dufour pjdufour.dev at gmail.com
Tue Dec 29 14:30:40 PST 2015


Good afternoon, Eduardo.

Could you briefly recap the relevant discussion during the sprint?  I
missed that conversation.

That is the expected behavior.  We wanted to be sure that if you
imported data from a source that isn't following that ISO standard
closely that the import will work rather than throwing an error.
GeoNode will match an existing category if possible and will create a
new category if needed.

I think my preference is to maintain that existing "default" behavior.
However, I think a flag in settings like "CATEGORIES_STRICT=False"
would work.  If CATEGORIES_STRICT is true, then if a category doesn't
match on upload/import an error is thrown.  If CATEGORIES_STRICT is
false, then the existing behavior goes.

Regards,
Patrick

On 12/29/15, Eduardo Castanho <eduardo.castanho at ipma.pt> wrote:
>
> Hi!! to all
>
> I'm trying to implement multiple Topic Categories in Geonode, so that
> the metadata is more according to ISO 19115, as was discussed in this
> year code sprint.
>
> But I have a doubt about  the correct  behavior in the upload of
> metadata that contains Topic Categories that doesn't  belong to ISO
> CodeList.
>
> Currently, Geonode creates a new  category  :
>
>                      elif key == 'topic_category':
>                                  value, created =
>                 TopicCategory.objects*.get_or_create*(
>                                      identifier=value.lower(),
>                                      defaults={'description': '',
>                 'gn_description': value})
>                                  key = 'category'
>                                  defaults[key] = value
>
>
> @ geonode/geonode/layers/utils.py (line 442)/****/
>
> Is this the expected behavior?
> If we have multiple categories imported from metatada files,  the number
> of new categories will raise a lot (including spelling errors), can this
> be bad ?
>
> with best regards,
> Eduardo Castanho
>
> IPMA
> Instituto Português do Mar e da Atmosfera
> Lisboa Portugal
>


More information about the geonode-devel mailing list