Using the app schema with complex features as source

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using the app schema with complex features as source

worldexplorer
Dear list,

in the past, I've worked with the app schema tutorial data. Simple features
stored in a java properties file which has been converted into complex
features for delivery via WFS.
Now, my data source has changed. I'm working with complex GML features
stored in a GML file which I want to request though a WFS.  
The documentation of the GeoServer points out that the mapping „works both
ways, so queries against properties of complex features are supported“. (
Application Schema Documentation
<http://docs.geoserver.org/latest/en/user/data/app-schema/index.html>  )

I am struggling right now with the meaning of the mapping file in this case.
Is it just the same way back? One mapping file per complex type which
“flattens” the data to simple features? Or is the app schema not able to do
that and works only as an adapter between my complex features and the valid
complex features XML output when I do a WFS request?  

I appreciate any help here.

Best,
Sebastian



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
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

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Using the app schema with complex features assource

GeoServer - User mailing list

Hi Sebastian,

 

I have worked with app-schema for the INSPIRE directive, serving complex features via WFS usually from PostgreSQL datastore. The experience should be relevant to other AppSchema uses though.  The complex feature mapping file I usually start it with HALE Studio and then manually fine tweaking the app-schema mapping file (in Notepad++), to get the fastest/best results from the DB schema.

 

Once the mapping file gets published to Geoserver you can then request the configured complex features from the server, and Geoserver + AppSchema will generate a file response based on the incoming KVP/POST requests encoded as either GML 3.2 or, but with some issues, GML 3.0

 

The incoming request may either be a „get entire dataset” (where you get all the features in a complex type), or a „subset” of the dataset (using stored queries filtering or using the GML:ID property). These requests are handled by the WFS getFeature request parameter, and you expect to receive a GML3.2 response containing the configured complex features.  

Alternatively the incoming request might use a getProperty value, in order to just get a sub-element from the complex features served through the WFS (ex: just the geometry, without all the other nested elements).

 

Geoserver & AppSchema cannot flatten data requested since it can’t solve the complex feature -> simple feature conversion, which implies you are limited in the output formats from the WFS request to either: text/xml or the „cannonical” application/xml+gml32 (no shapefile unfortunately), or json

 

A working example (two protected sites - polygons) of this is available at:

http://gmlid.eu/RO/ENV/PADS/WFS/ps/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=ps:ProtectedSite&outputFormat=json&count=2

 

I could provide more info if you could provide a clearer picture of what you are trying to achieve.

 

Sorin R.

 

Trimis din Mail pentru Windows 10

 

De la: [hidden email]
Trimis: marți, 11 septembrie 2018 11:27
Către: [hidden email]
Subiect: [Geoserver-users] Using the app schema with complex features assource

 

Dear list,

 

in the past, I've worked with the app schema tutorial data. Simple features

stored in a java properties file which has been converted into complex

features for delivery via WFS.

Now, my data source has changed. I'm working with complex GML features

stored in a GML file which I want to request though a WFS. 

The documentation of the GeoServer points out that the mapping „works both

ways, so queries against properties of complex features are supported“. (

Application Schema Documentation

<http://docs.geoserver.org/latest/en/user/data/app-schema/index.html>  )

 

I am struggling right now with the meaning of the mapping file in this case.

Is it just the same way back? One mapping file per complex type which

“flattens” the data to simple features? Or is the app schema not able to do

that and works only as an adapter between my complex features and the valid

complex features XML output when I do a WFS request? 

 

I appreciate any help here.

 

Best,

Sebastian

 

 

 

--

Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

 

 

_______________________________________________

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

 

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

 

 

[hidden email]

https://lists.sourceforge.net/lists/listinfo/geoserver-users

 



_______________________________________________
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

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Using the app schema with complex features assource

geowolf
In reply to this post by worldexplorer
On Tue, Sep 11, 2018 at 1:03 PM Sorin RUSU via Geoserver-users <[hidden email]> wrote:

Geoserver & AppSchema cannot flatten data requested since it can’t solve the complex feature -> simple feature conversion, which implies you are limited in the output formats from the WFS request to either: text/xml or the „cannonical” application/xml+gml32 (no shapefile unfortunately), or json


If you are interested in coding the change or funding the effort, flattening could be added as an option for the "flat" formats. The tricky part is to decide how to do the flattening, the obvious approach could be to use the xpath from root to attribute, with some safe separator, but it would come up with long names, and thus work poorly for shapefiles. Another approach could be to write a mapping text file, and just use A1, A2, A3, ... as the names... that is also somewhat poor.
Maybe one can hope that the attribute names are unique enough, and just use the full path for those that are not?

Cheers
Andrea

==

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 ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
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

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Using the app schema with complex features assource

worldexplorer
In reply to this post by GeoServer - User mailing list
Hi Sorin,

thank you for your response.


GeoServer - User mailing list wrote
> I could provide more info if you could provide a clearer picture of what
> you are trying to achieve.

Well, my data is in its complexity comparable with the INSPIRE data. It
based on an on object oriented model. All the features stores in one big GML
file. The features are described by five Schemata (xsd) files.
The goal is to request entire datasets or subsets through the WFS.



GeoServer - User mailing list wrote
> I have worked with app-schema for the INSPIRE directive, serving complex
> features via WFS usually from
*
> PostgreSQL datastore
*
> .

I thought about the fact to transform my data to store them in a PostgreSQL
datastore but i would like to avoid this step.


GeoServer - User mailing list wrote
> The complex feature mapping file I usually start it with
*
> HALE Studio
*
>  and then manually fine tweaking the app-schema mapping file (in
> Notepad++), to get the fastest/best results from the DB schema.

I also tried to create the app-schema mapping file with HALE Studio, but at
the current state of development HALE only supports a PostGIS source schema
(according to the support team). My source schema would be my complex GML
file.

That's why I'm trying to figure out what the mapping files should look like.
Or more specifically: Is it even possible to create a mapping file for
complex features in GML format as input data?

Best,
Sebastian



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
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

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users