-
Notifications
You must be signed in to change notification settings - Fork 92
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
Part4 update #153
Closed
Closed
Part4 update #153
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
63 changes: 63 additions & 0 deletions
63
hugo/content/usage/create_update_replace_delete_feature.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
title: "Create Replace Delete Feature" | ||
date: | ||
draft: false | ||
weight: 150 | ||
--- | ||
|
||
Transaction on Feature collections is supported. | ||
|
||
## Create feature | ||
|
||
POST query to the path `/collections/{collid}/items` allows to create | ||
a new feature in a feature collection. | ||
|
||
The geojson feature must be part of the request body. | ||
If the geometry geometry crs is different from the storage crs, the geometry will be transformed. | ||
Missing properties will be ignored and the table default value for the column will be applied. | ||
The id specified in the body is ignored and the database default value is used to create the feature. | ||
|
||
#### Example | ||
``` | ||
curl -i --request "POST" 'http://localhost:9000/collections/public.tramway_stations/items' -d '{"type":"Feature","id":"129","geometry":{"type":"Point","coordinates":[-71.222868058,46.836016945,0]},"properties":{"description":null,"diffusion":"Publique","niveau_rstc":"Tramway","nom":"Hôpital Enfant-Jésus","objectid":129,"type_station":"Reguliere"}}' | ||
``` | ||
## Update feature | ||
|
||
PATCH query to the path `/collections/{collid}/items/{fid}` allows to update | ||
a feature in a feature collection. | ||
|
||
The geojson feature must be part of the request body. | ||
If the geometry geometry crs is different from the storage crs, the geometry will be transformed. | ||
Missing properties will not be updated. | ||
The id specified in the body is ignored. | ||
|
||
#### Example | ||
``` | ||
curl -i --request "PUT" 'http://localhost:9000/collections/public.tramway_stations/items/129.json' -d '{"type":"Feature","id":"129","geometry":{"type":"Point","coordinates":[-71.222868058,46.836016945,0]},"properties":{"description":null,"diffusion":"Publique","niveau_rstc":"Tramway","nom":"Hôpital Enfant-Jésus","objectid":129,"type_station":"Reguliere"}}' | ||
``` | ||
|
||
## Replace feature | ||
|
||
PUT query to the path `/collections/{collid}/items/{fid}` allows to replace | ||
a feature in a feature collection. | ||
|
||
The geojson feature must be part of the request body. | ||
If the geometry geometry crs is different from the storage crs, the geometry will be transformed. | ||
Missing properties will be replaced with null (unless a database trigger is applied) | ||
The id specified in the body is ignored. | ||
|
||
#### Example | ||
``` | ||
curl -i --request "PUT" 'http://localhost:9000/collections/public.tramway_stations/items/129.json' -d '{"type":"Feature","id":"129","geometry":{"type":"Point","coordinates":[-71.222868058,46.836016945,0]},"properties":{"description":null,"diffusion":"Publique","niveau_rstc":"Tramway","nom":"Hôpital Enfant-Jésus","objectid":129,"type_station":"Reguliere"}}' | ||
``` | ||
|
||
## Delete feature | ||
|
||
DELETE query to the path `/collections/{collid}/items/{fid}` allows to delete | ||
a feature in a feature collection. | ||
|
||
#### Example | ||
``` | ||
curl -i --request "Delete" 'http://localhost:9000/collections/public.tramway_stations/items/129.json' | ||
``` | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the linked location/website does not exist. is this intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are the conformance class url from the specification: https://docs.ogc.org/DRAFTS/20-002.html#_conformance