Add early support for JSON-FG#2136
Draft
francbartoli wants to merge 8 commits intogeopython:masterfrom
Draft
Conversation
e88d476 to
2359c2e
Compare
Member
|
How does this provider differ from a (generic) GDAL based formatter capable of formatting to any OGR data type? |
Contributor
Author
|
It is very close potentially, what are you imaging? |
webb-ben
reviewed
Oct 26, 2025
| with gdal.OpenEx(json.dumps(data)) as srcDS: | ||
| tmpfile = f"/vsimem/{uuid.uuid1()}.json" | ||
| LOGGER.debug("Translate GeoJSON into a JSONFG memory file") | ||
| gdal.VectorTranslate(tmpfile, srcDS, format="JSONFG") |
Member
There was a problem hiding this comment.
Well once you read it into GDAL, any vector driver transform can occur. Wondering if would be possible to make any output format in the same spirit of the OGR provider - formatter config only barrier to add Shapefile, KML, etc. as an output format for pygeoapi GeoJSON.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds support to the most recent JSON-FG specification
0.3. It returns JSON-FG formatted payload with the following conformance classes:http://www.opengis.net/spec/json-fg-1/0.3/conf/corehttp://www.opengis.net/spec/json-fg-1/0.3/conf/types-schemasA new formatter has been added to the core for that scope and must rely on
GDAL>=3.12which supports0.3(not yet released as of today). As a consequence, this is a breaking change for our dependencies chain and cannot be merged untilrasteriowill support that version as well.This potentially might be relaxed after the merge of this branch https://github.com/geopython/pygeoapi/tree/formatters to have the formatter configurable at resource level and so the GDAL requirement needed only if it is configured.
Related Issue / discussion
Additional information
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)