Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for OGC API Records to metasearch #41713

Closed
wants to merge 1 commit into from

Conversation

pvgenuchten
Copy link

@pvgenuchten pvgenuchten commented Feb 20, 2021

!!early implementation!!

Description

This adds support for OGC API Records to metasearch. You can now either enter a CSW or a OGC API Records url in the service configuration. Try for example https://demo.pygeoapi.io/master.

image

Then search for records. Notice that when you select a record, a box is displayed in the map.

image

Currently the link relations (to wms, wfs) have not been implemented, due to limitation in the pygeoapi demo server.

Double click a record for more details

image

This requires owslib v0.20 (which is not in 3.16)
I've introduced shapely, it seems available by default in qgis
fixes #41566

@nyalldawson
Copy link
Collaborator

I've introduced shapely, it seems available by default in qgis

Can you remove this and use the native PyQgis API instead please? Shapely isn't a hard dependancy of qgis and there's nothing it offers which isn't available already through the qgis geometry classes

@pvgenuchten
Copy link
Author

hi @nyalldawson, i've looked for geojson to wkt but couldn't find it, other way around is available geom.toJson

@nyalldawson
Copy link
Collaborator

looked for geojson to wkt

QgsJsonUtils offers json to geometry conversion 👍

@pvgenuchten
Copy link
Author

QgsJsonUtils seems to work on full geojson featurecollection only, seems no utility to convert a single geometry
in stead used:

cs = record['geometry']['coordinates'][0]
g2 = QgsRectangle(cs[0][0], cs[0][1], cs[3][0], cs[3][1]).asWktPolygon()

(so shapely removed, thanx for mentioning)

add support for ogc api records to metasearch
remove shapely as suggested by @nyalldawson
@pvgenuchten pvgenuchten marked this pull request as draft February 21, 2021 13:23
@pvgenuchten
Copy link
Author

This work was a good learning experience, but duplicates work by @tomkralidis at https://github.com/tomkralidis/QGIS/tree/metasearch-oarec, i'm keeping it here as inspiration, but in draft status

@nyalldawson
Copy link
Collaborator

i'm keeping it here as inspiration, but in draft status

In that case can we close please? We have an issue with QGIS and this PR queue growing to unmanagable lengths, and the only way we've found to keep it maintainable is to close all PRs which aren't actually waiting for a merge...

@nyalldawson nyalldawson added the NOT FOR MERGE Don't merge! label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NOT FOR MERGE Don't merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for OGCAPI Records metasearch
2 participants