geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
207 stars 155 forks source link

QGIS MetaSearch - Search not working #568

Closed frafra closed 4 years ago

frafra commented 6 years ago

Description

pycsw doesn't seem to support search using QGIS MetaSearch.

Environment

Steps to Reproduce

  1. Try to look for "test" in QGIS MetaSearch

Result (QGIS error):

Search error: "Exception: the document is not valid.\nError: Element '{http://www.opengis.net/cat/csw/2.0.2}GetRecords', attribute 'resultType': [facet 'enumeration'] The value '' is not an element of the set {'results', 'hits', 'validate'}."

Additional Information

GET /csw?version=2.0.2&request=GetCapabilities&service=CSW HTTP/1.1
Host: psab.localhost
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.13.0

HTTP/1.1 200 OK
Date: Sun, 01 Apr 2018 20:12:29 GMT
Server: Apache/2.4.29 (Fedora) OpenSSL/1.1.0f-fips mod_wsgi/4.5.15 Python/3.6
Content-Length: 17503
X-Frame-Options: SAMEORIGIN
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/xml; charset=UTF-8

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- pycsw 2.0.3 -->
<csw:Capabilities xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:inspire_ds="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" updateSequence="None" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><ows:ServiceIdentification><ows:Title>PSAB Geospatial Catalogue</ows:Title><ows:Abstract>PSAB ... description ...</ows:Abstract><ows:Keywords><ows:Keyword>catalogue</ows:Keyword><ows:Keyword>discovery</ows:Keyword><ows:Keyword>metadata</ows:Keyword><ows:Type codeSpace="ISOTC211/19115">theme</ows:Type></ows:Keywords><ows:ServiceType codeSpace="OGC">CSW</ows:ServiceType><ows:ServiceTypeVersion>2.0.2</ows:ServiceTypeVersion><ows:ServiceTypeVersion>3.0.0</ows:ServiceTypeVersion><ows:Fees>None</ows:Fees><ows:AccessConstraints>None</ows:AccessConstraints></ows:ServiceIdentification><ows:ServiceProvider><ows:ProviderName>Organization Name</ows:ProviderName><ows:ProviderSite xlink:type="simple" xlink:href="http://psab.local/"/><ows:ServiceContact><ows:IndividualName>Lastname, Firstname</ows:IndividualName><ows:PositionName>Position Title</ows:PositionName><ows:ContactInfo><ows:Phone><ows:Voice>+xx-xxx-xxx-xxxx</ows:Voice><ows:Facsimile>+xx-xxx-xxx-xxxx</ows:Facsimile></ows:Phone><ows:Address><ows:DeliveryPoint>Mailing Address</ows:DeliveryPoint><ows:City>City</ows:City><ows:AdministrativeArea>Administrative Area</ows:AdministrativeArea><ows:PostalCode>Zip or Postal Code</ows:PostalCode><ows:Country>Country</ows:Country><ows:ElectronicMailAddress>you@example.org</ows:ElectronicMailAddress></ows:Address><ows:OnlineResource xlink:type="simple" xlink:href="Contact URL"/><ows:HoursOfService>Hours of Service</ows:HoursOfService><ows:ContactInstructions>During hours of service.  Off on weekends.</ows:ContactInstructions></ows:ContactInfo><ows:Role codeSpace="ISOTC211/19115">pointOfContact</ows:Role></ows:ServiceContact></ows:ServiceProvider><ows:OperationsMetadata><ows:Operation name="GetCapabilities"><ows:DCP><ows:HTTP><ows:Get xlink:type="simple" xlink:href="http://psab.localhost/csw"/><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="sections"><ows:Value>Filter_Capabilities</ows:Value><ows:Value>OperationsMetadata</ows:Value><ows:Value>ServiceIdentification</ows:Value><ows:Value>ServiceProvider</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="DescribeRecord"><ows:DCP><ows:HTTP><ows:Get xlink:type="simple" xlink:href="http://psab.localhost/csw"/><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="outputFormat"><ows:Value>application/json</ows:Value><ows:Value>application/xml</ows:Value></ows:Parameter><ows:Parameter name="schemaLanguage"><ows:Value>http://www.w3.org/2001/XMLSchema</ows:Value><ows:Value>http://www.w3.org/TR/xmlschema-1/</ows:Value><ows:Value>http://www.w3.org/XML/Schema</ows:Value></ows:Parameter><ows:Parameter name="typeName"><ows:Value>csw:Record</ows:Value><ows:Value>gmd:MD_Metadata</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="GetDomain"><ows:DCP><ows:HTTP><ows:Get xlink:type="simple" xlink:href="http://psab.localhost/csw"/><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="ParameterName"><ows:Value>DescribeRecord.outputFormat</ows:Value><ows:Value>DescribeRecord.schemaLanguage</ows:Value><ows:Value>DescribeRecord.typeName</ows:Value><ows:Value>GetCapabilities.sections</ows:Value><ows:Value>GetRecordById.ElementSetName</ows:Value><ows:Value>GetRecordById.outputFormat</ows:Value><ows:Value>GetRecordById.outputSchema</ows:Value><ows:Value>GetRecords.CONSTRAINTLANGUAGE</ows:Value><ows:Value>GetRecords.ElementSetName</ows:Value><ows:Value>GetRecords.outputFormat</ows:Value><ows:Value>GetRecords.outputSchema</ows:Value><ows:Value>GetRecords.resultType</ows:Value><ows:Value>GetRecords.typeNames</ows:Value><ows:Value>Harvest.ResourceType</ows:Value><ows:Value>Transaction.TransactionSchemas</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="GetRecords"><ows:DCP><ows:HTTP><ows:Get xlink:type="simple" xlink:href="http://psab.localhost/csw"/><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="CONSTRAINTLANGUAGE"><ows:Value>CQL_TEXT</ows:Value><ows:Value>FILTER</ows:Value></ows:Parameter><ows:Parameter name="ElementSetName"><ows:Value>brief</ows:Value><ows:Value>full</ows:Value><ows:Value>summary</ows:Value></ows:Parameter><ows:Parameter name="outputFormat"><ows:Value>application/json</ows:Value><ows:Value>application/xml</ows:Value></ows:Parameter><ows:Parameter name="outputSchema"><ows:Value>http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/</ows:Value><ows:Value>http://www.interlis.ch/INTERLIS2.3</ows:Value><ows:Value>http://www.isotc211.org/2005/gmd</ows:Value><ows:Value>http://www.opengis.net/cat/csw/2.0.2</ows:Value><ows:Value>http://www.opengis.net/cat/csw/csdgm</ows:Value><ows:Value>http://www.w3.org/2005/Atom</ows:Value></ows:Parameter><ows:Parameter name="resultType"><ows:Value>hits</ows:Value><ows:Value>results</ows:Value><ows:Value>validate</ows:Value></ows:Parameter><ows:Parameter name="typeNames"><ows:Value>csw:Record</ows:Value><ows:Value>gmd:MD_Metadata</ows:Value></ows:Parameter><ows:Constraint name="AdditionalQueryables"><ows:Value>apiso:AccessConstraints</ows:Value><ows:Value>apiso:Classification</ows:Value><ows:Value>apiso:ConditionApplyingToAccessAndUse</ows:Value><ows:Value>apiso:Contributor</ows:Value><ows:Value>apiso:Creator</ows:Value><ows:Value>apiso:Degree</ows:Value><ows:Value>apiso:Lineage</ows:Value><ows:Value>apiso:OtherConstraints</ows:Value><ows:Value>apiso:Publisher</ows:Value><ows:Value>apiso:Relation</ows:Value><ows:Value>apiso:ResponsiblePartyRole</ows:Value><ows:Value>apiso:SpecificationDate</ows:Value><ows:Value>apiso:SpecificationDateType</ows:Value><ows:Value>apiso:SpecificationTitle</ows:Value></ows:Constraint><ows:Constraint name="SupportedDublinCoreQueryables"><ows:Value>csw:AnyText</ows:Value><ows:Value>dc:contributor</ows:Value><ows:Value>dc:creator</ows:Value><ows:Value>dc:date</ows:Value><ows:Value>dc:format</ows:Value><ows:Value>dc:identifier</ows:Value><ows:Value>dc:language</ows:Value><ows:Value>dc:publisher</ows:Value><ows:Value>dc:relation</ows:Value><ows:Value>dc:rights</ows:Value><ows:Value>dc:source</ows:Value><ows:Value>dc:subject</ows:Value><ows:Value>dc:title</ows:Value><ows:Value>dc:type</ows:Value><ows:Value>dct:abstract</ows:Value><ows:Value>dct:alternative</ows:Value><ows:Value>dct:modified</ows:Value><ows:Value>dct:spatial</ows:Value><ows:Value>ows:BoundingBox</ows:Value></ows:Constraint><ows:Constraint name="SupportedISOQueryables"><ows:Value>apiso:Abstract</ows:Value><ows:Value>apiso:AlternateTitle</ows:Value><ows:Value>apiso:AnyText</ows:Value><ows:Value>apiso:BoundingBox</ows:Value><ows:Value>apiso:CRS</ows:Value><ows:Value>apiso:CouplingType</ows:Value><ows:Value>apiso:CreationDate</ows:Value><ows:Value>apiso:Denominator</ows:Value><ows:Value>apiso:DistanceUOM</ows:Value><ows:Value>apiso:DistanceValue</ows:Value><ows:Value>apiso:Format</ows:Value><ows:Value>apiso:GeographicDescriptionCode</ows:Value><ows:Value>apiso:HasSecurityConstraints</ows:Value><ows:Value>apiso:Identifier</ows:Value><ows:Value>apiso:KeywordType</ows:Value><ows:Value>apiso:Language</ows:Value><ows:Value>apiso:Modified</ows:Value><ows:Value>apiso:OperatesOn</ows:Value><ows:Value>apiso:OperatesOnIdentifier</ows:Value><ows:Value>apiso:OperatesOnName</ows:Value><ows:Value>apiso:Operation</ows:Value><ows:Value>apiso:OrganisationName</ows:Value><ows:Value>apiso:ParentIdentifier</ows:Value><ows:Value>apiso:PublicationDate</ows:Value><ows:Value>apiso:ResourceLanguage</ows:Value><ows:Value>apiso:RevisionDate</ows:Value><ows:Value>apiso:ServiceType</ows:Value><ows:Value>apiso:ServiceTypeVersion</ows:Value><ows:Value>apiso:Subject</ows:Value><ows:Value>apiso:TempExtent_begin</ows:Value><ows:Value>apiso:TempExtent_end</ows:Value><ows:Value>apiso:Title</ows:Value><ows:Value>apiso:TopicCategory</ows:Value><ows:Value>apiso:Type</ows:Value></ows:Constraint></ows:Operation><ows:Operation name="GetRecordById"><ows:DCP><ows:HTTP><ows:Get xlink:type="simple" xlink:href="http://psab.localhost/csw"/><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="ElementSetName"><ows:Value>brief</ows:Value><ows:Value>full</ows:Value><ows:Value>summary</ows:Value></ows:Parameter><ows:Parameter name="outputFormat"><ows:Value>application/json</ows:Value><ows:Value>application/xml</ows:Value></ows:Parameter><ows:Parameter name="outputSchema"><ows:Value>http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/</ows:Value><ows:Value>http://www.interlis.ch/INTERLIS2.3</ows:Value><ows:Value>http://www.isotc211.org/2005/gmd</ows:Value><ows:Value>http://www.opengis.net/cat/csw/2.0.2</ows:Value><ows:Value>http://www.opengis.net/cat/csw/csdgm</ows:Value><ows:Value>http://www.w3.org/2005/Atom</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="GetRepositoryItem"><ows:DCP><ows:HTTP><ows:Get xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP></ows:Operation><ows:Operation name="Transaction"><ows:DCP><ows:HTTP><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="TransactionSchemas"><ows:Value>http://www.isotc211.org/2005/gmi</ows:Value><ows:Value>http://www.opengis.net/cat/csw/2.0.2</ows:Value><ows:Value>http://www.opengis.net/cat/csw/3.0</ows:Value><ows:Value>http://www.opengis.net/sos/1.0</ows:Value><ows:Value>http://www.opengis.net/sos/2.0</ows:Value><ows:Value>http://www.opengis.net/wcs</ows:Value><ows:Value>http://www.opengis.net/wfs</ows:Value><ows:Value>http://www.opengis.net/wms</ows:Value><ows:Value>http://www.opengis.net/wmts/1.0</ows:Value><ows:Value>http://www.opengis.net/wps/1.0.0</ows:Value><ows:Value>urn:geoss:waf</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="Harvest"><ows:DCP><ows:HTTP><ows:Post xlink:type="simple" xlink:href="http://psab.localhost/csw"/></ows:HTTP></ows:DCP><ows:Parameter name="ResourceType"><ows:Value>http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/</ows:Value><ows:Value>http://www.interlis.ch/INTERLIS2.3</ows:Value><ows:Value>http://www.isotc211.org/2005/gmd</ows:Value><ows:Value>http://www.isotc211.org/2005/gmi</ows:Value><ows:Value>http://www.isotc211.org/schemas/2005/gmd/</ows:Value><ows:Value>http://www.opengis.net/cat/csw/2.0.2</ows:Value><ows:Value>http://www.opengis.net/cat/csw/3.0</ows:Value><ows:Value>http://www.opengis.net/cat/csw/csdgm</ows:Value><ows:Value>http://www.opengis.net/sos/1.0</ows:Value><ows:Value>http://www.opengis.net/sos/2.0</ows:Value><ows:Value>http://www.opengis.net/wcs</ows:Value><ows:Value>http://www.opengis.net/wfs</ows:Value><ows:Value>http://www.opengis.net/wms</ows:Value><ows:Value>http://www.opengis.net/wmts/1.0</ows:Value><ows:Value>http://www.opengis.net/wps/1.0.0</ows:Value><ows:Value>http://www.w3.org/2005/Atom</ows:Value><ows:Value>urn:geoss:waf</ows:Value></ows:Parameter></ows:Operation><ows:Parameter name="service"><ows:Value>CSW</ows:Value></ows:Parameter><ows:Parameter name="version"><ows:Value>2.0.2</ows:Value><ows:Value>3.0.0</ows:Value></ows:Parameter><ows:Constraint name="MaxRecordDefault"><ows:Value>10</ows:Value></ows:Constraint><ows:Constraint name="PostEncoding"><ows:Value>XML</ows:Value><ows:Value>SOAP</ows:Value></ows:Constraint><ows:Constraint name="XPathQueryables"><ows:Value>allowed</ows:Value></ows:Constraint><inspire_ds:ExtendedCapabilities xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0 http://inspire.ec.europa.eu/schemas/inspire_ds/1.0/inspire_ds.xsd"><inspire_common:ResourceLocator><inspire_common:URL>http://psab.localhost/csw?service=CSW&amp;version=2.0.2&amp;request=GetCapabilities</inspire_common:URL><inspire_common:MediaType>application/xml</inspire_common:MediaType></inspire_common:ResourceLocator><inspire_common:ResourceType>service</inspire_common:ResourceType><inspire_common:TemporalReference><inspire_common:TemporalExtent><inspire_common:IntervalOfDates><inspire_common:StartingDate>YYYY-MM-DD</inspire_common:StartingDate><inspire_common:EndDate>YYYY-MM-DD</inspire_common:EndDate></inspire_common:IntervalOfDates></inspire_common:TemporalExtent></inspire_common:TemporalReference><inspire_common:Conformity><inspire_common:Specification xsi:type="inspire_common:citationInspireInteroperabilityRegulation_eng"><inspire_common:Title>COMMISSION REGULATION (EU) No 1089/2010 of 23 November 2010 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards interoperability of spatial data sets and services</inspire_common:Title><inspire_common:DateOfPublication>2010-12-08</inspire_common:DateOfPublication><inspire_common:URI>OJ:L:2010:323:0011:0102:EN:PDF</inspire_common:URI><inspire_common:ResourceLocator><inspire_common:URL>http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:EN:PDF</inspire_common:URL><inspire_common:MediaType>application/pdf</inspire_common:MediaType></inspire_common:ResourceLocator></inspire_common:Specification><inspire_common:Degree>notEvaluated</inspire_common:Degree></inspire_common:Conformity><inspire_common:MetadataPointOfContact><inspire_common:OrganisationName>Organization Name</inspire_common:OrganisationName><inspire_common:EmailAddress>Email Address</inspire_common:EmailAddress></inspire_common:MetadataPointOfContact><inspire_common:MetadataDate>YYYY-MM-DD</inspire_common:MetadataDate><inspire_common:SpatialDataServiceType>discovery</inspire_common:SpatialDataServiceType><inspire_common:MandatoryKeyword xsi:type="inspire_common:classificationOfSpatialDataService"><inspire_common:KeywordValue>infoCatalogueService</inspire_common:KeywordValue></inspire_common:MandatoryKeyword><inspire_common:Keyword xsi:type="inspire_common:inspireTheme_eng"><inspire_common:OriginatingControlledVocabulary><inspire_common:Title>GEMET - INSPIRE themes</inspire_common:Title><inspire_common:DateOfPublication>2008-06-01</inspire_common:DateOfPublication></inspire_common:OriginatingControlledVocabulary><inspire_common:KeywordValue>Utility and governmental services</inspire_common:KeywordValue></inspire_common:Keyword><inspire_common:SupportedLanguages><inspire_common:DefaultLanguage><inspire_common:Language>eng</inspire_common:Language></inspire_common:DefaultLanguage><inspire_common:SupportedLanguage><inspire_common:Language>eng</inspire_common:Language></inspire_common:SupportedLanguage><inspire_common:SupportedLanguage><inspire_common:Language>gre</inspire_common:Language></inspire_common:SupportedLanguage></inspire_common:SupportedLanguages><inspire_common:ResponseLanguage><inspire_common:Language>eng</inspire_common:Language></inspire_common:ResponseLanguage></inspire_ds:ExtendedCapabilities></ows:OperationsMetadata><ogc:Filter_Capabilities><ogc:Spatial_Capabilities><ogc:GeometryOperands><ogc:GeometryOperand>gml:Point</ogc:GeometryOperand><ogc:GeometryOperand>gml:LineString</ogc:GeometryOperand><ogc:GeometryOperand>gml:Polygon</ogc:GeometryOperand><ogc:GeometryOperand>gml:Envelope</ogc:GeometryOperand></ogc:GeometryOperands><ogc:SpatialOperators><ogc:SpatialOperator name="BBOX"/><ogc:SpatialOperator name="Beyond"/><ogc:SpatialOperator name="Contains"/><ogc:SpatialOperator name="Crosses"/><ogc:SpatialOperator name="Disjoint"/><ogc:SpatialOperator name="DWithin"/><ogc:SpatialOperator name="Equals"/><ogc:SpatialOperator name="Intersects"/><ogc:SpatialOperator name="Overlaps"/><ogc:SpatialOperator name="Touches"/><ogc:SpatialOperator name="Within"/></ogc:SpatialOperators></ogc:Spatial_Capabilities><ogc:Scalar_Capabilities><ogc:LogicalOperators/><ogc:ComparisonOperators><ogc:ComparisonOperator>Between</ogc:ComparisonOperator><ogc:ComparisonOperator>EqualTo</ogc:ComparisonOperator><ogc:ComparisonOperator>GreaterThan</ogc:ComparisonOperator><ogc:ComparisonOperator>GreaterThanEqualTo</ogc:ComparisonOperator><ogc:ComparisonOperator>LessThan</ogc:ComparisonOperator><ogc:ComparisonOperator>LessThanEqualTo</ogc:ComparisonOperator><ogc:ComparisonOperator>Like</ogc:ComparisonOperator><ogc:ComparisonOperator>NotEqualTo</ogc:ComparisonOperator><ogc:ComparisonOperator>NullCheck</ogc:ComparisonOperator></ogc:ComparisonOperators><ogc:ArithmeticOperators><ogc:Functions><ogc:FunctionNames><ogc:FunctionName nArgs="1">length</ogc:FunctionName><ogc:FunctionName nArgs="1">lower</ogc:FunctionName><ogc:FunctionName nArgs="1">ltrim</ogc:FunctionName><ogc:FunctionName nArgs="1">rtrim</ogc:FunctionName><ogc:FunctionName nArgs="1">trim</ogc:FunctionName><ogc:FunctionName nArgs="1">upper</ogc:FunctionName></ogc:FunctionNames></ogc:Functions></ogc:ArithmeticOperators></ogc:Scalar_Capabilities><ogc:Id_Capabilities><ogc:EID/><ogc:FID/></ogc:Id_Capabilities></ogc:Filter_Capabilities></csw:Capabilities>
tomkralidis commented 5 years ago

@kwilcox can you provide which version of pycsw you used as as well as QGIS?

kwilcox commented 5 years ago

Did you mean to ping the OP?

tomkralidis commented 5 years ago

Grrr, sorry @kwilcox ! @frafra bump

frafra commented 5 years ago

@tomkralidis That was one year ago, I will have to test it again. Maybe related to #567