benoitdm-oslandia / pg_featureserv Goto Github PK
View Code? Open in Web Editor NEWThis project forked from crunchydata/pg_featureserv
License: Apache License 2.0
This project forked from crunchydata/pg_featureserv
License: Apache License 2.0
Actuellement les fonctions du catalog retournent l'objet sérialisé en JSON. Ce comportement ne sera pas viable si on doit faire du GML. Il faut donc modifier ces fonctions pour qu'elles retournent l'objet à sérialiser. La sérialisation est déléguée à la fonction appelante.
In GitLab by @benoitdm-oslandia on Sep 19, 2022, 16:41
In GitLab by @benoitdm-oslandia on Oct 10, 2022, 09:44
"Optimistic locking" defines an optimistic locking mechanism to support concurrent resource updates
What if the request does not contain an eTag?
See the filed issue and this reflection on the implementation
no if-match
==> error
As editor, I want to remove an existing feature in order to clean up collection
/
/hugo/
In GitLab by @benoitdm-oslandia on Sep 19, 2022, 09:16
In GitLab by @azarz on Sep 20, 2022, 16:19
Pour l'instant, la grande majorité des codes de retours sont des 500, alors que dans certains cas il me semble que des 400 seraient plus pertinents. Exemples:
Exemple dans les tests : une requête est volontairement mal formée, mais on s'attend quand même à un 500 :
https://git.oslandia.net/Client-projects/geoplateforme-ign-pg-featureserv/-/blob/develop/internal/service/handler_update_test.go#L251
Dans le cas du replace, j'ai opté pour un 400 dans ce cas là.
"Security" defines how the system checks authentication and permissions
test de charge pour calculer le temps pris
Produire des stats pour différentes configurations (nombre de workers, nombre de requetes, etc.)
As editor, I want to have data schemas in geojson in order to know the fields needed to update the collection
Limitation and reduction of transmitted data (Cf. opengeospatial/ogcapi-features#738)
Extensions not validated yet:
simplification of geometries
==> the filtering must be in the unit of the native projection of the data. See opengeospatial/ogcapi-features#654 (comment)
US #143
In GitLab by @benoitdm-oslandia on Aug 29, 2022, 09:44
In GitLab by @benoitdm-oslandia on Sep 19, 2022, 09:13
"Feature" defines additional features on GET: [schema for update/replace](http://docs.ogc.org /DRAFTS/20-002.html#feature-representations)
In GitLab by @benoitdm-oslandia on Sep 19, 2022, 16:41
In GitLab by @benoitdm-oslandia on Sep 19, 2022, 09:16
/
/hugo/
As editor, I want to completely replace an existing feature in order to modify the collection
In GitLab by @benoitdm-oslandia on Sep 19, 2022, 09:13
As admin, I want to identify the sender of the requests in order to be able to validate the access to the resources.
OR
As a data producer, I want the partners to whom I have given the rights to be able to modify/delete/add data in my database in order to keep my collaborative database up to date.
As admin, I want to identify the sender of the requests in order to be able to validate the authentication
vérifier que l'api contienne le PATCH
vérifier que le schéma json est disponible ?
vérifier que la donnée est modifiée
ajouter la route avec nouvelle methode (handler) :
http PATCH /collections/{collId}/items/{featureId}
ajouter un nouveau Content-Type :
application/merge-patch+json
construire le body (mock):
{
"geometry": {
"coordinates": [
[[[-122.2679,37.8009],[-122.2679,37.8009],
[-122.2681,37.8007],[-122.2678,37.8005],
[-122.2676,37.8008],[-122.2679,37.8009]]]
]
},
"properties": {
"apnid": 1310,
"primary_material": "red brick"
}
}
tests à faire dans le handler :
construire la reponse en json (Content-Type: application/geo+json):
{
"type": "Feature",
"id": "OB.2",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[[[-122.2679,37.8009],[-122.2679,37.8009],
[-122.2681,37.8007],[-122.2678,37.8005],
[-122.2676,37.8008],[-122.2679,37.8009]]]
]
},
"properties": {
"shape_len": 402.19805753,
"shape_area": 10117.0666708,
"bldgid3": "258 11TH ST_bldg1",
"bldgid2": "258 11TH ST",
"bldgtype": "Store Building",
"final_apn": "002 006901000",
"apnid": 1310
"nostory": 1,
"bldgnum": "bldg1",
"numbldgs": 1,
"comname": "John Sardell & Sons"
"primary_material": "red brick"
}
}
mettre en place les mocks si nécessaire
ajouter l'impl. openapi pour le swagger
tester avec le swagger ou curl
implémenter fonctions d'update UpdateTableFeature
dans les catalogues:
Gestion d'un tag pour les CRS (autre que l'EPSG:4326 par defaut) ?
Peut on ajouter directement une nouvelle propertie (ex. primary_material) ?
R: non
L'ajout d'une nouvelle properties doit elle être gerée dans l'impl. route pour modification de schema ?
R: Pour l'instant ce n'est pas prévu
Only superusers can create event triggers.
(https://www.postgresql.org/docs/current/sql-createeventtrigger.html)/
/hugo/
Comment détecter les changements fait par une application tierce ?
As editor, I want to partially modify an existing feature in order to update the collection
See "Update" provides the ability to use the HTTP PATCH method to modify parts of an existing resource without having to transmit a complete replacement resource.
Could be tricky to handle if we accept to add new properties to existing feature. By the way, does it mean all the feature will have this new property? And, in this case, what should be the default value? ==> opengeospatial/ogcapi-features#737
As editor, I want to read data in another crs so as not to have to do the conversions on my desktop
Actuellement seuls les types int et string sont testés.
Idées :
SELECT pg_xact_commit_timestamp(xmin), * FROM YOUR_TABLE_NAME where ID=VALUE;
func getWeakETag (table, id) []byte {
return cache[table][id]
}
Tests:
Cache:
Headers:
Divers:
As editor, I want to create a feature in an existing collection in order to enrich the collection
Partiellement réalisé via #19
func etag(tableName string, id, query_param, crs) string {
// crc := crc32.ChecksumIEEE(data) # weak
weakETag := getWeakETag (tableName, id)
return fmt.Sprintf(`W/"%s-%s-%d-'Reference to deleted milestone 08'X"`, name, crs, len(data), weakETag)
}
table_name + crs + base64 (id, champ, weak)
As editor, I want to add or modify data in another crs so as not to have to do the conversions on my post
As editor, I want to have GML data schemas in order to know the fields needed to update the collection
Idées :
SELECT pg_xact_commit_timestamp(xmin), * FROM YOUR_TABLE_NAME where ID=VALUE;
func getWeakETag (table, id) []byte {
return cache[table][id]
}
/
/hugo/
Le fichier go.sum n'est peut être pas nécessaire et dans ce cas autant le supprimer afin d'éviter de commiter chaque modification de paquet (qui peut dépendre de la version de go)
Voir aussi : https://stackoverflow.com/questions/53837919/should-go-sum-file-be-checked-in-to-the-git-repository
Pour les benchmark et tests de charge
"Create/Replace/Delete" provides the ability to add, replace, and delete individual resources from 'a collection
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.