[GeoNode-users] Documentation for CSW

Israel López asralf at gmail.com
Wed May 4 11:49:52 PDT 2016


Thanks Tom yes, in that way is working.
Great.

2016-05-04 7:17 GMT-05:00 Tom Kralidis <tomkralidis at gmail.com>:

>
> Hi Israel:
>
> On Tue, 3 May 2016, Israel López wrote:
>
> Date: Tue, 3 May 2016 22:47:21 -0500
>> From: Israel López <asralf at gmail.com>
>> To: Tom Kralidis <tomkralidis at gmail.com>
>> Cc: Simone Dalmasso <simone.dalmasso at gmail.com>,
>>     geonode-users <geonode-users at lists.osgeo.org>
>> Subject: Re: [GeoNode-users] Documentation for CSW
>>
>> Thanks so much Tom, your information is very useful.
>>
>> I've tested it, but I have two observations in the ISO query:
>>
>> 1. In keywords (maybe it was type error), I could get it but without the
>> number "2"
>> at final of the query, i. e.
>>
>> print csw.records.itervalues().next().identificationinfo[0].keywords
>>
>>
> Good catch.  .keywords2 was added in a recent version of OWSLib, which
> likely hasn't
> made it to GeoNode and will replace .keywords over time.  Having said
> this, using
> keywords is fine.
>
> 2. For the TopicCategory, I can't get it still. The returned value is an
>> empty array.
>> I attach an image.
>>
>> [image: Imagen integrada 2]
>>
>> when I get the ISO metadata via geonode interface, using this:
>>
>>
>> http://ide.adesur.centrogeo.org.mx/catalogue/csw?outputschema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd&service=CSW&request=GetRecordById&version=2.0.2&elementsetname=full&id=63444cf2-f984-11e4-89e1-0050569122ab
>>
>> I can see that the category is there, and I know that the resource have
>> it.
>>
>> I don't know if a parameter is missing to query the full metadata or
>> something else.
>>
>>
> When I query your CSW, I'm able to see the topic category for that record:
>
> csw.getrecordbyid(['63444cf2-f984-11e4-89e1-0050569122ab'], outputschema='
>>>> http://www.isotc211.org/2005/gmd', esn='full')
>>>>
>>>> csw.records['63444cf2-f984-11e4-89e1-0050569122ab'].identificationinfo[0].topiccategory
>>>>
>>> ['environment']
>
>
> Israel Lopez
>>
>>
>> 2016-05-03 19:01 GMT-05:00 Tom Kralidis <tomkralidis at gmail.com>:
>>
>> Hi Israel: thanks for the info.  This should work.  Notes:
>>>
>>> - in the default CSW schema representation, keywords are represented by
>>> 1..n dc:subject elements.  You can access this in OWSLib via:
>>> csw.records.itervalues().next().subjects
>>> - Categories need to be set in the UI or provided via ISO metadata (which
>>> supports a TopicCategory element), and are then available via querying
>>> the
>>> CSW for an ISO schema representation, i.e.:
>>>
>>> csw.getrecords2(outputschema='http://www.isotc211.org/2005/gmd')
>>> print csw.results
>>> print csw.records.itervalues().next().identificationinfo[0].topiccategory
>>> print csw.records.itervalues().next().identificationinfo[0].keywords2
>>>
>>> Having said this, there is currently no way to express the Category in
>>> the default CSW schema provided by pycsw.  I've filed a pycsw issue [1]
>>> to fix this for cases where the core CSW schema is the preferred option.
>>>
>>> Hope this helps.
>>>
>>> Thanks
>>>
>>> ..Tom
>>>
>>> [1] https://github.com/geopython/pycsw/issues/432
>>>
>>> On Mon, May 2, 2016 at 4:46 PM, Israel López <asralf at gmail.com> wrote:
>>>
>>>>
>>>> Hello Tom, thanks so much for the info, well I'm running the next
>>>>
>>> commands
>>>
>>>> on
>>>> a python console:
>>>>
>>>> from owslib.csw import CatalogueServiceWeb
>>>>>>> csw =
>>>>>>> CatalogueServiceWeb('
>>>>>>> http://ide.adesur.centrogeo.org.mx/catalogue/csw
>>>>>>>
>>>>>> ')
>>>
>>>> csw.getrecords2(maxrecords=1000)
>>>>>>> csw.results
>>>>>>>
>>>>>>
>>>> According with this documentation:
>>>>
>>>> https://geopython.github.io/OWSLib/#csw
>>>>
>>>> for testing purpose I use this, to retrieve a specific field:
>>>>
>>>> print csw.records.itervalues().next().title
>>>>>>>
>>>>>>
>>>> for title and abstract I don't have any troubles, but for things
>>>> like keywords and others, It doesn't work.
>>>>
>>>> I'lll appreciate your help..
>>>>
>>>>
>>>> Israel Lopez
>>>>
>>>>
>>>>
>>>> 2016-04-30 13:01 GMT-05:00 Tom Kralidis <tomkralidis at gmail.com>:
>>>>
>>>>>
>>>>> Hi Israel: thanks for the info.  To add to Simone's recommendation:
>>>>>
>>>>> - the physical mappings in GeoNode are defined in [1] and follow the
>>>>> semantics defined in [2]
>>>>> - GeoNode's CSW support (pycsw) uses GeoNode's "ResourceBase" model [3]
>>>>>
>>>>> Having said this, things like keywords and categories should work out
>>>>> of the box in
>>>>> GeoNode's CSW per se.  Can you provide a workflow so I can reproduce?
>>>>>
>>>>> Thanks
>>>>>
>>>>> ..Tom
>>>>>
>>>>> [1]
>>>>>
>>>>>
>>> https://github.com/GeoNode/geonode/blob/master/geonode/catalogue/backends/pycsw_local_mappings.py
>>>
>>>> [2]
>>>>>
>>>>>
>>> http://docs.pycsw.org/en/latest/administration.html#mapping-to-an-existing-repository
>>>
>>>> [3]
>>>>>
>>>>>
>>> https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L226
>>>
>>>>
>>>>> On Sat, Apr 30, 2016 at 7:04 AM, Simone Dalmasso
>>>>> <simone.dalmasso at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Here you will find the docs http://pycsw.org/
>>>>>>
>>>>>> Hope this helps.
>>>>>>
>>>>>> Il sabato 30 aprile 2016, Israel López <asralf at gmail.com> ha scritto:
>>>>>>
>>>>>>>
>>>>>>> Hi dear devs I'm looking for documentation for the use of
>>>>>>> the geonode's catalogue service (CSW), i want to know
>>>>>>> how to configure it, mapping and get specific metadata fields.
>>>>>>>
>>>>>>> Right now I just can get the title and the abstract of the resources,
>>>>>>> but I cannot get things like the keywords and categories, this
>>>>>>> information is important to me.
>>>>>>>
>>>>>>> Any help is valuable, thanks in advance,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Simone
>>>>>>
>>>>>> _______________________________________________
>>>>>> geonode-users mailing list
>>>>>> geonode-users at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160504/9212e78a/attachment.html>


More information about the geonode-users mailing list