[OWSLib-users] OWSlib - CSW metadata

Henrik Schuller hgs716 at gmail.com
Fri Sep 9 06:11:10 PDT 2016


Thx alot Tom, now i got alot more information out of the CSW :)

Maybe just me that is inexperienced, but how do i get information out of
objects like the ones i get here:

from owslib.csw import CatalogueServiceWeb

csw = CatalogueServiceWeb('http://www.geonorge.no/geonetwork/srv/nor/csw-service?')
csw.getrecords2(typenames='gmd:MD_Metadata', esn='full', resulttype="results",
                outputschema="http://www.isotc211.org/2005/gmd", maxrecords=50)

for rec in csw.records:
    print((csw.records[rec].identification.contact))

>From Henrik



2016-09-09 12:55 GMT+02:00 Tom Kralidis <tomkralidis at gmail.com>:

>
>
> On Fri, 9 Sep 2016, Henrik Schuller wrote:
>
> Date: Fri, 9 Sep 2016 12:57:24 +0200
>> From: Henrik Schuller <hgs716 at gmail.com>
>> To: OWSLib-users at lists.osgeo.org
>> Subject: [OWSLib-users] OWSlib - CSW metadata
>>
>> Hi,
>>
>>
>>
>> I am using OWSlib to GetRecords from a CSW
>> (*http://www.geonorge.no/geonetwork/srv/nor/csw-service
>> <http://www.geonorge.no/geonetwork/srv/nor/csw-service>*, but I would
>> like
>> to get more information about the records than what is given in dublin
>> core. Is there any easy way that I could get information like
>> gmd:individualName or srv:operatesOn for every record?
>>
>>
>> I can see that this information is available in OWSlib - iso, but I don't
>> see an easy way to implement it for the csw.records.
>>
>>
> Try doing the getrecords2 request using ISO as the outputschema (Dublin
> Core
> is default):
>
> from owslib.csw import CatalogueServiceWeb
>
> csw = CatalogueServiceWeb('http://www.geonorge.no/geonetwork/srv/
> nor/csw-service')
>
> csw.getrecords2(outputschema='http://www.isotc211.org/2005/gmd')
>
> The CSW will then return the ISO representation of matching metadata
> records.
>
> Hope this helps
>
> ..Tom
>
>
>>
>> Henrik
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owslib-users/attachments/20160909/77e2d9b6/attachment.html>


More information about the OWSLib-users mailing list