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