Closed xmichael closed 9 years ago
Current approach: all PCAPI /records/
calls with POST/PUT/DELETE
and an option ogc_sync=true
will invoke a database update.
This is irrelevant to #3 which is kept for future OGR uses (e.g. exporting everything to a geopackage)
Do you want me to add the parameter on the app?
Good idea, if it doesn't break anything from existing functionality (it shouldn't) then it will be good to be able to test this directly with the app.
This has been implemented as publishing step after the records/asset is upload using a GET request with ogc_sync=true. e.g.
GET /records/local/uid/myrecord?ogc_sync=true
This will insert the record to a postgis table using the schema specified in the record fields and , if enabled in pcapi.ini, will publish it to a geoserver endpoint. The table is dynamically created from the basename of the editor file.
We still need documentation updates before closing this
In hackathon 2 it was decided to just incrementally export all observations to WFS without any prompts or publish step. The assumption being that the publication is a separate step than the exporting to a WFs.
PCAPI needs to constantly update a database (granularity to be defined, time-based or observation based). This will make the architecture quite rigid -- maybe someusers want PCAPI without export to a WFS or for storing non-geo infromation... Best solution might be to get the phone to call the "export" functionality on sync.