extend the sniffing capability to head out to the endpoint to find out what it is#6
extend the sniffing capability to head out to the endpoint to find out what it is#6pvgenuchten wants to merge 2 commits intogeopython:masterfrom
Conversation
d7415f0 to
a3ffc82
Compare
…t what it is some comments: - it may return an array of protocols, if multiple are supported - for backwards compatibility, you need to set first=False to allow multiple (multiple is also slow) - you need to set extended=True to activate the extended sniffing
a3ffc82 to
7efc5d9
Compare
|
Thanks @pvgenuchten! Initial comments:
if extended:
LOGGER.debug('Probing URL')
return probe.detect(url)
|
|
Hi Tom, thanx for reviewing, i like the probe idea, fixing reqs I missed the dusting commit, will rebase
This may cause problems in software using geolinks (like pycsw) when updating... I'm fine either way |
Yes, this will cause breakage, we can safeguard accordingly. |
add owslib to requirements
|
Some additional comments/questions:
|
I would probably keep that outside geolinks, given most clients do not. So your downstream application can grab the base URL from the link and inspect
I guess this has to do with the is the entry point of a geolinks workflow in the current OGC API design patterns. In other words, OGC APIs now provide a clear way to articulate a link's "type" via link relations. Of course, some workflows would receive a full link object, and some just an href (which needs geolinks :) ). Thinking out loud, examples from https://demo.pygeoapi.io/master/collections/gdps-temperature?f=json This is clearly direct access to a coverage: {
"type": "application/x-grib2",
"rel": "http://www.opengis.net/def/rel/ogc/1.0/coverage",
"title": "Coverage data as GRIB2",
"href": "https://demo.pygeoapi.io/master/collections/gdps-temperature/coverage?f=GRIB2"
}This is direct access to a collection: {
"type": "application/json",
"rel": "collection",
"title": "Detailed Coverage metadata in JSON",
"href": "https://demo.pygeoapi.io/master/collections/gdps-temperature?f=json"
}...which (when P.S.
Your PR prompted the dusting commit, so thanks :) |
Some comments:
pending: