Hi Ursula,
in general GeoServer is written to target simple features, with localized
exceptions to also handle complex ones,
often with dedicated, separate code paths, as complex features lack a
number of optimizations that are made
easy by the flat nature of simple features.

The differentiator is not whether the schema is simple or complex, but
whether or not the SimpleFeature, SimpleFeatureType
and SimpleFeatureCollection Java classes are used to represent the
features: a flat feature built using classes that can be used
to represent complex features, is still complex to the code.

The shapefile output format has been hard coded on simple features for as
long as I can remember,
and so is the KML encoder.

DescribeFeatureType has completely separate code paths for complex and
simple, complex assumes there is
a well known target schema to abide to, and just links to it (preserving
all annotations, constraints and whatnot),
simple assumes the structure has been reflected out of a data source and
builds a bare-bone schema on the fly,
just names and types (eventually annotations too, if the database columns
have comments).

In theory, code paths could be developed that recognize what looks like a
complex feature is actually a simple one,
and transform them on the fly before they reach the output formats.
Not sure about DescribeFeatureType, as all the documentation found in your
target schemas annotations
would be lost in the complex -> simple step, but maybe one can think about
in-lining the schema, or just make the
flattening behavior optional.

The usual guide
<https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-fixes,-improvements-and-new-features-in-GeoServer>
applies in terms of making any of the above happen.

Regards,

Andrea Aime


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

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


On Thu, Jul 11, 2024 at 5:51 AM Michael, Ursula (DEM) <
ursula.mich...@sa.gov.au> wrote:

> UNOFFICIAL
>
> Hi Geoserver users,
>
>
>
> We have several layers built using the app-schema extension that are
> gmlsf:ComplianceLevel = 0, so are simple features, but geoserver
> incorrectly evaluating them to be complex-valued properties for some
> functionality.
>
> This means that the WFS KML and shapefile outputFormats are not available
> or throwing the below exception, and DescribeFeatureType is behaving like a
> complex service and not returning the list of fields – so impacting the
> general QGIS and ESRI wfs layer imports.
>
>
>
> <ServiceExceptionReport xmlns=http://www.opengis.net/ogc xmlns:xsi=
> http://www.w3.org/2001/XMLSchema-instance
>  version="1.2.0" xsi:schemaLocation=http://www.opengis.net/ogc
> http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd
> <http://www.opengis.net/ogc%20http:/schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd>
> >
>
> <ServiceException> java.lang.ClassCastException: class
> org.geoserver.wfs.TypeInfoCollectionWrapper$Complex cannot be cast to class
> org.geotools.data.simple.SimpleFeatureCollection
> (org.geoserver.wfs.TypeInfoCollectionWrapper$Complex and
> org.geotools.data.simple.SimpleFeatureCollection are in unnamed module of
> loader org.apache.catalina.loader.ParallelWebappClassLoader @21694e53)
> class org.geoserver.wfs.TypeInfoCollectionWrapper$Complex cannot be cast to
> class org.geotools.data.simple.SimpleFeatureCollection
> (org.geoserver.wfs.TypeInfoCollectionWrapper$Complex and
> org.geotools.data.simple.SimpleFeatureCollection are in unnamed module of
> loader org.apache.catalina.loader.ParallelWebappClassLoader
> @21694e53) </ServiceException>
>
> </ServiceExceptionReport>
>
>
>
>
>
> It also looks like the OGC API Features queryables requests are also
> unsupported
>
>
> Error: response status is 500
>
>
>
> {
>
>   "type": "NoApplicableCode",
>
>   "title": "Could not find acceptable representation"
>
> }
>
>
>
> These are a couple of the light view SF-0 schemas we are using
>
> https://schemas.opengis.net/gsml/4.1/geosciml-lite.xsd
>
>
> https://schemas.geoscience.gov.au/MineralTenementML/1.0/mineraltenementml.xsd
>
>
>
> Could this be a bug, or have all layers built using the app-schema
> extension has always interpreted the layers as complex - so new
> functionality?
>
>
>
> Kind regards,
>
> Ursula
>
> _______________________________________________
> 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
>
>
> Geoserver-users@lists.sourceforge.net
> 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


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

Reply via email to