[Geoserver-devel] [Geotools-devel] Make GML 3 the default in the Layer Preview page

I expect you wanted this for the geoserver-devel list :slight_smile:

by all means filter the list of formats as appropriate for the layer being published.

···

On 22 September 2015 at 08:33, Stefano Costa <stefano.costa@anonymised.com> wrote:

Dear all,
I would like to hear your opinion on changing the behavior of the Layer Preview page’s GML links.

As it is now, the GML link printed right next to the OpenLayers and KML links in the Common Formats column issues a WFS 1.0 request with no outputFormat parameter in it, which means GML2 is picked as output format.

How do you feel about having the GML link pick GML 3.2, or at least GML 3.1, as output format?

One good reason to do it, besides GML2 being ancient, is that Complex Features seem to break the GML2 encoder, so clicking on the GML link for any app-schema layer will result in the following exception:

java.lang.ClassCastException: org.geotools.feature.type.ComplexFeatureTypeImpl cannot be cast to org.opengis.feature.simple.SimpleFeatureType org.geotools.feature.type.ComplexFeatureTypeImpl cannot be cast to org.opengis.feature.simple.SimpleFeatureType

Do you see any drawbacks in making GML3 the default?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.



GeoTools-Devel mailing list
GeoTools-Devel@anonymised.coms.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Jody Garnett

Thanks to all for the feedback!
…and sorry for posting to the wrong list… thanks Jody for fixing it :slight_smile:

···

I could do some logic on the layer’s datastore type, e.g. if it is an app-schema datastore, use WFS 1.1/GML 3.2 as Andrea suggested.

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Stefano,

could we have WFS 1.1 / GML 3.1 for GML 3.1 application schemas, and WFS 2.0 / GML 3.2 for GML 3.2 application schemas? If you want WFS 1.1 for both, then we must have outputformat=gml32 for GML 3.2 application schemas (or the output is garbled):
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html

Kind regards,
Ben.

On 26/09/15 09:34, Stefano Costa wrote:

I could do some logic on the layer's datastore type, e.g. if it is an
app-schema datastore, use WFS 1.1/GML 3.2 as Andrea suggested.

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Hi Ben (et al.),
I’ve done some work on this and it’s starting to look good.

To implement Ben’s suggestion, I had to parse the mapping file and inspect the declared namespaces, looking for either “http://www.opengis.net/gml” (aka GML 3.1.1) or “http://www.opengis.net/gml/3.2” (aka GML 3.2) was defined.

I’m also making sure that the global OWS service is used for app-schema layers, to avoid issues with secondary namespaces (see: http://docs.geoserver.org/latest/en/user/data/app-schema/secondary-namespaces.html#when-to-configure-for-secondary-namespaces)

I have a few questions:

  1. The code so far is not pretty, as I’m basically doing if-else logic on the feature type’s datastore connection parameters directly inside the org.geoserver.web.demo.PreviewLayer class. It would have been better to setup some extension mechanism, like defining a GMLLinkProvider interface for which modules like app-schema could provide implementations, that the preview page would then look up via Spring and use to create the GML link. Considering that so far, as I understand, app-schema layers are the only one that need special treatment, do you think it is worth the effort required to setup such mechanism?

  2. How am I going to test this? Ben, do you have any suggestions as to how to quickly setup some app-schema layers to test?

  3. I believe that for app-schema layers all WFS output formats which don’t support complex features (i.e. all but GML 3.1.1/3.2) should either not be added to the list of available formats or return a nice error message, like the KML output format does: “The KML output format can only be applied to simple features”

  4. I believe the OpenLayers, KML and all WMS output formats should be hidden if the published layer is geometryless, or the lat/lon bbox is null/empty: should I prepare a second PR with this improvement as well?

Any feedback is welcome, thanks! :slight_smile:

···

On Sat, Sep 26, 2015 at 12:10 AM, Ben Caradoc-Davies <ben@anonymised.com> wrote:

Stefano,

could we have WFS 1.1 / GML 3.1 for GML 3.1 application schemas, and WFS 2.0 / GML 3.2 for GML 3.2 application schemas? If you want WFS 1.1 for both, then we must have outputformat=gml32 for GML 3.2 application schemas (or the output is garbled):
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html

Kind regards,
Ben.

On 26/09/15 09:34, Stefano Costa wrote:

I could do some logic on the layer’s datastore type, e.g. if it is an
app-schema datastore, use WFS 1.1/GML 3.2 as Andrea suggested.


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

On Wed, Sep 30, 2015 at 6:17 PM, Stefano Costa <
stefano.costa@anonymised.com> wrote:

1) The code so far is not pretty, as I'm basically doing if-else logic on
the feature type's datastore connection parameters directly inside the
org.geoserver.web.demo.PreviewLayer class. It would have been better to
setup some extension mechanism, like defining a GMLLinkProvider interface
for which modules like app-schema could provide implementations, that the
preview page would then look up via Spring and use to create the GML link.
Considering that so far, as I understand, app-schema layers are the only
one that need special treatment, do you think it is worth the effort
required to setup such mechanism?

No strong opinion either way

2) How am I going to test this? Ben, do you have any suggestions as to how
to quickly setup some app-schema layers to test?

Check the app schema integration test module in extension. Ben probably
knows more/better ways, but while I'm answering...

3) I believe that for app-schema layers all WFS output formats which don't
support complex features (i.e. all but GML 3.1.1/3.2) should either not be
added to the list of available formats or return a nice error message, like
the KML output format does: "The KML output format can only be applied to
simple features"

We probably need to extend the WFS output format classes so that they
report if they are complex feature aware, or not?

4) I believe the OpenLayers, KML and all WMS output formats should be
hidden if the published layer is geometryless, or the lat/lon bbox is
null/empty: should I prepare a second PR with this improvement as well?

Good idea

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 Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
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.

-------------------------------------------------------

Hi Andrea,
thanks for your feedback.

···

On Wed, Sep 30, 2015 at 6:33 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Well, yes, if we want to be able to selectively show / hide the links… not needed if we just want to throw a ServiceException showing a nicer error message, as WFSKMLOutputFormat does:
https://github.com/geoserver/geoserver/blob/d54d57219141b9d8806307c1f02228c0008912c4/src/kml/src/main/java/org/geoserver/kml/WFSKMLOutputFormat.java#L106

Other output format classes do an unchecked cast to SimpleFeatureCollection, which results in an ugly ClassCastException message being reported:
java.lang.ClassCastException: org.geotools.data.complex.MappingFeatureCollection cannot be cast to org.geotools.data.simple.SimpleFeatureCollection

  1. I believe that for app-schema layers all WFS output formats which don’t support complex features (i.e. all but GML 3.1.1/3.2) should either not be added to the list of available formats or return a nice error message, like the KML output format does: “The KML output format can only be applied to simple features”

We probably need to extend the WFS output format classes so that they report if they are complex feature aware, or not?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

On 01/10/15 05:17, Stefano Costa wrote:

To implement Ben's suggestion, I had to parse the mapping file and inspect
the declared namespaces, looking for either "http://www.opengis.net/gml&quot;
(aka GML 3.1.1) or "http://www.opengis.net/gml/3.2&quot; (aka GML 3.2) was
defined.

Stefano, this is not going to work for all cases. The problem is that mapping files only need to declare one of these namespaces if the prefix is used a targetElement xpath. I am sure that I have seen valid mapping files that do not either. GML is used only via import in the target schema.

One way to be sure is to use AppSchemaDataAccess.getSchema to get the feature type, then get the XSD type smuggled in the user data map, and then walk up parent XSD types until you find either GML 3.1 or GML 3.2 AbstractFeatureType. The WFS standard states that feature types must be subtypes of gml:AbstractFeatureType.

1) The code so far is not pretty, as I'm basically doing if-else logic on
the feature type's datastore connection parameters directly inside the
org.geoserver.web.demo.PreviewLayer class. It would have been better to
setup some extension mechanism, like defining a GMLLinkProvider interface
for which modules like app-schema could provide implementations, that the
preview page would then look up via Spring and use to create the GML link.
Considering that so far, as I understand, app-schema layers are the only
one that need special treatment, do you think it is worth the effort
required to setup such mechanism?

In my view no. A little ugly may be more maintainable than a new interface that is only used in one case.

2) How am I going to test this? Ben, do you have any suggestions as to how
to quickly setup some app-schema layers to test?

There are test fixtures in GeoServer gs-app-schema-test. I do not think there are any Wicket test fixtures, but you should be able to add some based on those in the GeoServer gs-web-* modules.

3) I believe that for app-schema layers all WFS output formats which don't
support complex features (i.e. all but GML 3.1.1/3.2) should either not be
added to the list of available formats or return a nice error message, like
the KML output format does: "The KML output format can only be applied to
simple features"

Sounds good to me.

4) I believe the OpenLayers, KML and all WMS output formats should be
hidden if the published layer is geometryless, or the lat/lon bbox is
null/empty: should I prepare a second PR with this improvement as well?

Sure, that sounds sensible.

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Hi Ben,
I took a first shot at this, here is the PR:
https://github.com/geoserver/geoserver/pull/1246

···

On Wed, Sep 30, 2015 at 10:40 PM, Ben Caradoc-Davies <ben@anonymised.com> wrote:

Stefano, this is not going to work for all cases. The problem is that mapping files only need to declare one of these namespaces if the prefix is used a targetElement xpath. I am sure that I have seen valid mapping files that do not either. GML is used only via import in the target schema.

One way to be sure is to use AppSchemaDataAccess.getSchema to get the feature type, then get the XSD type smuggled in the user data map, and then walk up parent XSD types until you find either GML 3.1 or GML 3.2 AbstractFeatureType. The WFS standard states that feature types must be subtypes of gml:AbstractFeatureType.

Right, I took for granted that every app-schema mapping configuration would declare a GML namespace, but it’s an unwarranted assumption.

I followed your suggestion, but used AttributeType.getSuper() to walk the type hierarchy instead of inspecting XSD types, as it felt easier to code: it seems to be working ok, do you see any drawbacks in this approach?

In my view no. A little ugly may be more maintainable than a new interface that is only used in one case.

There you go, ugly, but (hopefully) more maintainable. :slight_smile:

There are test fixtures in GeoServer gs-app-schema-test. I do not think there are any Wicket test fixtures, but you should be able to add some based on those in the GeoServer gs-web-* modules.

I added two test classes extending GeoServerWicketTestSupport to gs-app-schema-test.

I will address the other concerns in separate PR(s).

Thanks again for the feedback!

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

On 02/10/15 05:30, Stefano Costa wrote:

I took a first shot at this, here is the PR:
https://github.com/geoserver/geoserver/pull/1246

Thanks. I have reported some problems building that branch on the PR. I have not yet reviewed the substantive content but hope to do so when I have time.

I followed your suggestion, but used AttributeType.getSuper() to walk the
type hierarchy instead of inspecting XSD types, as it felt easier to code:
it seems to be working ok, do you see any drawbacks in this approach?

Your approach is much better than my suggestion! What was I thinking?

I added two test classes extending GeoServerWicketTestSupport to
gs-app-schema-test.

As mentioned on the PR, I still see a unit test failure in Maven even with some pom fixes.

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

On 01/10/15 05:17, Stefano Costa wrote:

4) I believe the OpenLayers, KML and all WMS output formats should be
hidden if the published layer is geometryless, or the lat/lon bbox is
null/empty: should I prepare a second PR with this improvement as well?

I have merged PR #1246. Thanks, Stefano. Great work!
https://github.com/geoserver/geoserver/pull/1246

A quick test with the app-schema-tutorial configuration suggests that tip-level-geometry-less app-schema feature types are now omitted from the Layer Demo page. The omitted type is gsml:GeologicUnit, which contains geometries only in its nested gsml:MappedFeature. Is this because the bbox is empty? Such types should have a GML link.

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

On Fri, Oct 2, 2015 at 11:06 PM, Ben Caradoc-Davies <ben@anonymised.com>
wrote:

On 01/10/15 05:17, Stefano Costa wrote:
> 4) I believe the OpenLayers, KML and all WMS output formats should be
> hidden if the published layer is geometryless, or the lat/lon bbox is
> null/empty: should I prepare a second PR with this improvement as well?

I have merged PR #1246. Thanks, Stefano. Great work!
https://github.com/geoserver/geoserver/pull/1246

A quick test with the app-schema-tutorial configuration suggests that
tip-level-geometry-less app-schema feature types are now omitted from
the Layer Demo page. The omitted type is gsml:GeologicUnit, which
contains geometries only in its nested gsml:MappedFeature. Is this
because the bbox is empty? Such types should have a GML link.

Actually, all vector types should have a GML link, and some other WFS ones
too, since they can deal with geometryless data just fine, e.g.,
JSON, probably CSV, Excel (extension output format) but not for example
shapefile.
We'd need an indication if the output format is geometryless capable, or 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 Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
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.

-------------------------------------------------------

Hi Ben,

···

On Fri, Oct 2, 2015 at 11:06 PM, Ben Caradoc-Davies <ben@anonymised.com.> wrote:

A quick test with the app-schema-tutorial configuration suggests that tip-level-geometry-less app-schema feature types are now omitted from the Layer Demo page. The omitted type is gsml:GeologicUnit, which contains geometries only in its nested gsml:MappedFeature. Is this because the bbox is empty? Such types should have a GML link.

I suspect the missing link is due to a missing layer.xml file in the app-schema tutorial configuration: could you confirm this is the case (see also my comment on the PR)?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

On 06/10/15 04:50, Stefano Costa wrote:

I suspect the missing link is due to a missing layer.xml file in the
app-schema tutorial configuration: could you confirm this is the case

Stefano,

thanks for solving this problem. I can confirm that, when I add a layer.xml, the GeologicUnit type appears in the layer preview and its GML link works as expected. I have now added a layer.xml for GeologicUnit and fixed the titles and abstracts for both types (neglected before as they never worked). Thanks!

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand