Hi Marco,
those types can be represented in postgresql by arrays and hstore,
respectively, without particular issues (assuming you want to
keep a flat table structure, if you go relational then the app-schema store
is probably your best option).
Making GeoServer handle them properly is another story though. In no
particular order:
- Change the postgresql store to understand and read those attributes
- Change the store to allow filtering on them (might be optional)
- Choose a way to represent them in GML, including the schema. For the
arrays it's easy, just add a multiplicity > 1, for the maps I would go for
a new xml type that contains a list of xs:any,
- Change the 3 GML encoder(s) to handle them (the GML2 one, the GML3
traditional one, the "fast" GML3 encoder)
- The GeoJSON encoder can already handle maps, adding arrays should be
easy
- Decide what to do with other output types
- Eventually, handle writing as well (parsing GML, modify the store to
write the new attribute types)
All in all I believe it's all pretty feasible, but not a 5 minutes
implementation :-p
Cheers
Andrea
On Fri, Oct 28, 2016 at 9:25 AM, Dr. Marco Lechner <[email protected]> wrote:
> Hi,
>
> any body who knows if (how) it could be possible to use Geoserver/WFS to
> deliver Vectordata that has 1:n relations in its attribute table?
>
> { "type": "FeatureCollection",
> "features": [
> { "type": "Feature",
> "geometry": {"type": "Point", "coordinates": [7.8, 48.0]},
> "properties": {
> "prop0": "Freiburg",
> "listprop": [ "a", "b", "c" ]
> }
> },
> { "type": "Feature",
> "geometry": {"type": "Point", "coordinates": [7.9, 48.1]},
> "properties": {
> "prop0": "near Freiburg",
> "dictprop": {
> "x": [1, 2, 3],
> "y": [11, 22, 33]
> }
> }
> },
> { "type": "Feature",
> "geometry": {"type": "Point", "coordinates": [7.9, 48.0]},
> "properties": {
> "prop0": "near Freiburg 2",
> "listprop": [ "a", "b", "c" ],
> "dictprop": {
> "x": [1, 2, 3],
> "y": [11, 22, 33]
> }
> }
> }
> ]
> }
>
> Such a geojson is AFAIK valid and it definitely can be handled by
> openlayers or leaflet without problems. the datastructure could be
> created by postgis (e.g. view from join) using data-type json for
> "dictprop"- or "listprop" values, ...).
> in addition to my question if Geoserver can deal with those data, it
> comes to my mind, if this is OGC compliant and therefore can be
> transported using OGC-WFS anyhow?
>
> Any hint welcome.
>
> Marco
>
>
>
> --
> Dr. Marco Lechner
> Bundesamt fuer Strahlenschutz / Federal Office for Radiation Protection
> SW2.1 Koordination Notfallschutzsysteme / Coordination Emergency Systems
> Rosastrasse 9 | D-79098 Freiburg | Germany
> [email protected] | +49 (0)3018 333 6724 | www.bfs.de
>
> --
> Hinweis zu Anhängen die auf .p7m/.p7c/.p7s oder .asc/.asc.sig enden:
> Die .p7?- und .asc-Dateien sind ungefährliche Signaturdateien (digitale
> Unterschriften).
> In E-Mail-Clients mit S/MIME Konfiguration (.p7?) oder PGP-Erweiterung
> (.asc) dienen sie zur:
> - - Überprüfung des Absenders
> - - Überprüfung einer evtl. Veränderung des Inhalts während der
> Übermittlung über das Internet
> Die Signaturdateien können ebenso dazu verwendet werden dem Absender
> dieser Signatur eine E-Mail mit verschlüsseltem Inhalt zu senden.
>
> In E-Mail-Clients ohne S/MIME Konfiguration oder PGP-Erweiterung
> erscheinen die Dateien als Anhang und können ignoriert werden.
>
> ------------------------------------------------------------
> ------------------
> The Command Line: Reinvented for Modern Developers
> Did the resurgence of CLI tooling catch you by surprise?
> Reconnect with the command line and become more productive.
> Learn the new .NET and ASP.NET CLI. Get your free copy!
> http://sdm.link/telerik
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
==
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.
-------------------------------------------------------
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users