Discussion:
[Geoserver-users] Updating an App Schema Data Store via REST
Gavin Medley
2017-06-29 17:04:45 UTC
Permalink
Hi,

Has anyone implemented an App Schema Data Store (such as a Postgres
database) to be updated via REST? I would love a working example of how you
import data.

More ambitiously, we actually map our Postgres schema to the GeodesyML
schema for WFS requests (using several feature-chained app schema mapping
files). Is it possible to upload data in GeodesyML via REST and have
Geoserver "reverse map" the data back into Postgres during the REST import
so that we can allow database updates through Geoserver?

Documentation, working code, examples, or just discussion is much
appreciated.

Cheers,

Gavin
--
Gavin Medley
USIP Intern
***@unavco.org
Ben Caradoc-Davies
2017-06-30 00:43:10 UTC
Permalink
Gavin,

as far as I know, REST can only be used to update configurations and
data files, not data in a database

The OGC standard to update data in a database is WFS-T (transactional
WFS), but this is only supported in GeoServer for simple features, and
is not supported by the app-schema plugin.

If you expose your underlying database tables as simple features, you
can use WFS-T to update them. The updates will be encoded in the simple
feature type not GeodesyML.

app-schema support for WFS-T will have to address identity and
cardinality of nested features; when a complex feature is updated, are
nested features also updated? This could be tricky to implement.

Kind regards,
Ben.
Post by Gavin Medley
Hi,
Has anyone implemented an App Schema Data Store (such as a Postgres
database) to be updated via REST? I would love a working example of how you
import data.
More ambitiously, we actually map our Postgres schema to the GeodesyML
schema for WFS requests (using several feature-chained app schema mapping
files). Is it possible to upload data in GeodesyML via REST and have
Geoserver "reverse map" the data back into Postgres during the REST import
so that we can allow database updates through Geoserver?
Documentation, working code, examples, or just discussion is much
appreciated.
Cheers,
Gavin
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime
2017-06-30 07:17:43 UTC
Permalink
as far as I know, REST can only be used to update configurations and data
files, not data in a database
If the use case is fine grained changes driven by filters (e.g., update
this 100 features matching a=xyz) then WFS-T is the
only game in town.
If we are talking about a mass change like replacing the whole content of a
table, then the importer extension
REST API can help, see:
http://docs.geoserver.org/latest/en/user/extensions/importer/rest_reference.html#updating-a-task

There is however a gotcha, a database backing app-schema normally has
referential integrity constraints,
and I'm not sure one can run multiple table updates in a single transaction
using the importer (however,
the same should be possible using WFS-T, although I have not verified)
--
Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo Ú consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Loading...