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

Simone Dalmasso simone.dalmasso at gmail.com
Fri Jan 8 11:07:30 PST 2016


Eduardo I would keep it as it is now: False.

2016-01-08 19:42 GMT+01:00 Eduardo Castanho <eduardo.castanho at ipma.pt>:

> Hi to all!
>
> I haven’t notice that the flag MODIFY_TOPICCATEGORY already existed.
> This flag at the moment only controls the change of the topic categories
> via admin page but doesn’t control if a new topic category can be added via
> metadata, as I described in my first email.
> I  will use this flag to control if the metadata can contain new
> categories or not,  returning 'the topic category/theme 'x' is invalid!' if
> not.
>
> My doubt is what should be the default/initial value of the flag ?
>
> The implementation is almost complete I will make a pull request soon.
> Regards,
>
> Eduardo Castanho
>
> IPMA
> Instituto Português do Mar e da Atmosfera
> Lisboa Portugal
>
> On 30-12-2015 21:43, Patrick Dufour wrote:
>
> I agree that multiple categories set for a resourcebase object should be
> possible.
>
> Yes, with batch metadata editing, fixing by hand shouldn't be difficult.
>
> For the flag, how will GeoNode "know" the categories are ISO.  It's
> implied, since they are the only ones there by default, but the flag
> wouldn't trigger an ISO check.  It would just check that the category
> currently exists or not.  Otherwise, we'd probably need another field in
> the Category model to say whether each is ISO or not.  Either option is
> acceptable.
>
> Regards,
> Patrick
> On Dec 30, 2015 10:37 AM, "Eduardo Castanho" <eduardo.castanho at ipma.pt>
> wrote:
>
>> Hi! Patrick
>>
>> In last day of the code sprint in Turin,  we talked about  the lack of
>> fields in Geonode metatada, comparing with ISO 19115 profile.
>> One of those fields was Topic Category, that isn't fully supported by
>> Geonode, because it only accepts one, more specifically  the first  topic
>> category  value on the metadata file.
>>
>> Your  suggestion seems fine to me, but it implies that if you start with
>> the flag on False and then change it  to True, the data that you have in
>> Geonode will be inconsistent, for example, the TopicCategory Model/Table
>> will have non ISO entries.
>> Some sort of solution to minimize this can be implemented, but in my
>> opinion it only will bring an overload to the Geonode and this can be
>> easily managed by "hand".
>>
>> May be the name for the FLAG  can be more explicit like
>> ISO_CATEGORIES_STRICT.
>>
>>
>> Regards,
>>
>> Eduardo Castanho
>>
>> IPMA
>> Instituto Português do Mar e da Atmosfera
>> Lisboa Portugal
>>
>>
>>
>>
>> On 29-12-2015 22:30, Patrick Dufour wrote:
>>
>>> 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
>>>>
>>>>
>>
>
> _______________________________________________
> geonode-devel mailing list
> geonode-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160108/540b14c6/attachment-0001.html>


More information about the geonode-devel mailing list