Comments (14)
Makes sense. I imagine that functionality will be provider specific/dependent and that our provider base class would throw NotImplementedError
by default.
from pygeoapi.
About the POST /item[s]/[uuid]
It IMHO should return 404, since the endpoint does not exist yet. I have nothing against having required [uu]id in the body of the request
from pygeoapi.
POST /collections/{collectionID}/items
with a body of Item
or even FeatureCollection
(have seen latter somewhere, MapFish API?). Item
already has an id
-field (cannot find back if id
is indeed mandatory, seems not in OAPIF. "id is a local identifier of the feature" and ... that strictly only the URI needs to be unique.
Some sources indicate that PUT
should be used to add (if Entity not exists) or replace (if exists) a specific Entity (in our case Item
):
https://restfulapi.net/rest-put-vs-post/
So
POST /collections/{collectionID}/items [obj]
Adds (new) Item (Feature) to the collection.
and
PUT /collections/{collectionID}/items/{featureId} [obj]
would add or replace an Item with specific URI (id?).
Update: saw a more recent link to the Stac spec in Gitter from @cholmes, the above aligns with this:
https://github.com/radiantearth/stac-spec/tree/master/api-spec/extensions/transaction
from pygeoapi.
Create feature
POST /items/ [obj]
ID should not be forced while feature creation?
ID should be returned
from pygeoapi.
My $2ct: The "id thing" requires some thinking-through: it needs to be unique within a Collection
on one hand, so IMHO cannot be enforced on the client (think of multiple clients POST/PUTing at the same time), unless maybe with UUIDs. WFS2 had an idgen
option, remember? "The idgen attribute control how a WFS generates identifiers from newly created feature instances using the Insert action. The default action is to have the WFS generate a new id for the features. This is also backward compatible with WFS 1.0 where the only action was for the WFS to generate an new id. Don't know if we need this flexibility/complexity, just wanted to mention.
A use case for client-supplied id's are e.g. Cadastral Parcel id's (or INSPIRE-ids brr). Or in SensorWeb: station-ids.
Another example: With SensorThings API Transactions, when POSTing a Thing
, the server always generates a unique id (within the Things
Collection), but at same time allows a client to set a client-unique field, e.g. a station id
within a free-form properties
hashmap. So a client can always find back its Things
(this was a severe limitation in SOS). Best of both worlds but then again STA has a fixed abstract entity model like an appschema.
from pygeoapi.
btw The STAC Pilot Transaction spec (to which OAPIF refers, see above) is IMHO not really clear on this: one POST
s an Item to a Collection
and probably if the Item
contains an id
it is validated for uniqueness and used, otherwise generated (?), but id
is mandatory in Item
(?). That could be a simple solution without idgen
...
from pygeoapi.
@justb4 I would also consider PATCH
to change only a feature property:
PATCH /collections/{collectionID}/items/{featureId} [obj]
would change the field value of an item, it could also be the geometry
from pygeoapi.
@francbartoli thanks, yes PATCH
for partial updates (except for id
itself IMHO) should be considered.
from pygeoapi.
Sure @justb4, except the feature identifier
from pygeoapi.
Note: transactions draft now at http://docs.opengeospatial.org/DRAFTS/20-002.html
from pygeoapi.
Thanks @tomkralidis, very good reference to follow for the implementation
from pygeoapi.
What is the status here?
from pygeoapi.
For now, we continue to monitor the OGC draft for developments, contributions against are welcome.
from pygeoapi.
Implemented in #984
from pygeoapi.
Related Issues (20)
- `title` text of links need to be translatable for multilingual support
- issue with geopython/pygeoapi docker image HOT 2
- add action for vulnerability testing HOT 1
- update API object when configuration changes HOT 4
- Are conformance class links supposed to resolve? HOT 1
- Set begin/end datetime via admin api
- certify pygeoapi compliant to OGC API - Processes
- EDR incorrect name of `parameter-name` query parameter
- Missing Information on pygeoapi INSTALL instructions
- Add support to retrieving properties on the mvt_elastic provider
- key-error when requesting map in non supported crs code
- generate openapi, if not available during server start
- mapscript is required for mapscript layers, but not in requirements.txt
- `get_collection_items` fails due to usage of @staticmethod
- Add proper handling for outputTransmission HOT 2
- Implement Connection Pooling for Oracle Provider to Improve Performance HOT 4
- PyGeoAPI Process: Hello World fail to execute HOT 4
- Broken pagination for features HOT 1
- Allow using sqlalchemy > 2
- Compatibility with Pydantic >= 2 through pydantic.v1 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygeoapi.