[GeoNode-users] Documentation for CSW

Israel López asralf at gmail.com
Tue May 3 20:47:21 PDT 2016


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

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.


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/20160503/98f7e62b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 36047 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160503/98f7e62b/attachment-0001.png>


More information about the geonode-users mailing list