[GeoNode-users] Documentation for CSW
Tom Kralidis
tomkralidis at gmail.com
Tue May 3 17:01:03 PDT 2016
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
>> >
>
>
More information about the geonode-users
mailing list