Re: [Geoserver-users] Appschema and Sld for WMS

2018-01-18 Thread Francisco Caldeira
Hello Nuno,



That is not the solution either



http://inspire.ine.pt:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd";>
 
   

  The requested Style can not be used with this layer.  The style 
specifies an attribute of 
gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href 
and the layer is: gn:NamedPlace







Regards

Francisco



Cumprimentos,

Francisco Caldeira

Serviço de Georreferenciação

  Av. A. José de Almeida – 1000-043 Lisboa

  Tel.+351 218426100 / ext.1438

francisco.calde...@ine.pt | www.ine.pt <http://www.ine.pt/>

  ___



cid:image001.gif@01cbc6ea.4a3b0560

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: quinta-feira, 18 de janeiro de 2018 15:26
To: geoserver-users@lists.sourceforge.net
Cc: Francisco Caldeira
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



The property name path:



 

   
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href

 


should be:



 

   
gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href

 


gn:NamedPlace/ should be removed from the path since the path needs to be 
relative to the root entity.


Hopefully this should work :)

On 01/18/2018 02:58 PM, Francisco Caldeira wrote:

Hello Nuno,



I went to confirm again, and the message is:



http://inspire.ine.pt:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd>
 
"http://inspire.ine.pt:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd";>
 
   

  The requested Style can not be used with this layer.  The style 
specifies an attribute of 
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href
 
and the layer is: gn:NamedPlace







My sld now look like this:





http://www.opengis.net/sldStyledLayerDescriptor.xsd> 
"http://www.opengis.net/sld StyledLayerDescriptor.xsd"

 xmlns= <http://www.opengis.net/sld> "http://www.opengis.net/sld";

 xmlns:ogc= <http://www.opengis.net/ogc> "http://www.opengis.net/ogc";

 xmlns:xlink= <http://www.w3.org/1999/xlink> "http://www.w3.org/1999/xlink";

 xmlns:gn= <http://inspire.ec.europa.eu/schemas/gn/4.0> 
"http://inspire.ec.europa.eu/schemas/gn/4.0";

 xmlns:xsi= <http://www.w3.org/2001/XMLSchema-instance> 
"http://www.w3.org/2001/XMLSchema-instance";>

  

  

GN Geographical Names





  GN.NamedPlaced

  Label place name

  

  

  



  GN.NamedPlaced.name

  Label with no outline

  A arial 10pt label  

   

 

   
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href

 

 

  Arial

  10

   

  

  



  0.5

  0.5





  0

      0

    

  



   



  



  





Regards

Francisco



Cumprimentos,

Francisco Caldeira

Serviço de Georreferenciação

  Av. A. José de Almeida – 1000-043 Lisboa

  Tel.+351 218426100 / ext.1438

francisco.calde...@ine.pt | www.ine.pt <http://www.ine.pt/>

  ___



cid:image001.gif@01cbc6ea.4a3b0560

-- 
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

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

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

Re: [Geoserver-users] Appschema and Sld for WMS

2018-01-18 Thread Francisco Caldeira
Hello Nuno,



I went to confirm again, and the message is:



http://inspire.ine.pt:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd";>
 
   

  The requested Style can not be used with this layer.  The style 
specifies an attribute of 
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href
 
and the layer is: gn:NamedPlace







My sld now look like this:





http://www.opengis.net/sld StyledLayerDescriptor.xsd"

 xmlns="http://www.opengis.net/sld";

 xmlns:ogc="http://www.opengis.net/ogc";

 xmlns:xlink="http://www.w3.org/1999/xlink";

 xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0";

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

  

  

GN Geographical Names





  GN.NamedPlaced

  Label place name

  

  

  



  GN.NamedPlaced.name

  Label with no outline

  A arial 10pt label  

   

 

   
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href

 

 

  Arial

  10

   

  

  



  0.5

  0.5





  0

  0



  



   

    

      

    

  





Regards

Francisco



Cumprimentos,

Francisco Caldeira

Serviço de Georreferenciação

  Av. A. José de Almeida – 1000-043 Lisboa

  Tel.+351 218426100 / ext.1438

francisco.calde...@ine.pt | www.ine.pt <http://www.ine.pt/>

  ___



cid:image001.gif@01cbc6ea.4a3b0560

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: quinta-feira, 18 de janeiro de 2018 14:43
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



*Maybe we step on a new bug :P

On 01/18/2018 02:16 PM, Nuno Oliveira wrote:

Hi Francisco,

Euuh is a bit a strange that the error still referring the full property 
path:

gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href

If the style property was updated to:

gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href

The error message should say IMHO:

The requested Style can not be used with this layer.  The style specifies an 
attribute of
gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href
and the layer is: gn:NamedPlace

Maybe he step on a new bug :P

On 01/18/2018 02:05 PM, Francisco Caldeira wrote:

Hello Nuno,



Thanks for the reply but it doesn’t fix it, I still got the message on layer 
preview…



  The requested Style can not be used with this layer.  The style 
specifies an attribute of 
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href
 
and the layer is: gn:NamedPlace



Regards

F



Cumprimentos,

Francisco Caldeira

Serviço de Georreferenciação

  Av. A. José de Almeida – 1000-043 Lisboa

  Tel.+351 218426100 / ext.1438

francisco.calde...@ine.pt | www.ine.pt <http://www.ine.pt/>

  ___



cid:image001.gif@01cbc6ea.4a3b0560

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: terça-feira, 16 de janeiro de 2018 16:29
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



Hi Francisco,

You may be interested in this thread:
http://osgeo-org.1560.x6.nabble.com/Referencing-App-Schema-defined-feature-types-properties-in-styles-SLD-td5347766.html

long story short you should try to reference your property using a path 
relative to the root entity:




gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href



If this fix your issue please remember to update the related ticket !

Kind regards,

Nuno Oliveira

On 12/04/2017 11:08 AM, Francisco Caldeira wrote:

Hello,



Ok Nuno Oliveira, I’m going to create the issue on the bug tracker.



Thank you and all for the help!

Regards

F





cid:image001.gif@01cbc6ea.4a3b0560
Francisco Caldeira - Serviço de GeoInformação

I.N.E. - Instituto Nacional de Estatística
Avenida António José de Almeida
100-043 Lisboa
Portugal
francisco.calde...@ine.pt
(351) - 21 8426100
Ext. 1438

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: sexta-feira, 1 de dezembro de 2017 10:07
To: Andrea Aime
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



Sorry Andrea forgot to share the details indeed, my bad.

The inner exception is actually swallowed at some point (this should be 
fixed some way ... logging the exception ?), the relevant part is this one 
(full stacktrace attached):

java.lang.NullPointerException
at 
org.geotools.feature.xpath.FeatureTypeAttributePointer.(FeatureTypeAttributePointer.java:90)
at 
org.geotools.feature.xpath.SingleFeatureTypeAttri

Re: [Geoserver-users] Appschema and Sld for WMS

2018-01-18 Thread Francisco Caldeira
Hello Nuno,



Thanks for the reply but it doesn’t fix it, I still got the message on layer 
preview…



  The requested Style can not be used with this layer.  The style 
specifies an attribute of 
gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href
 
and the layer is: gn:NamedPlace



Regards

F



Cumprimentos,

Francisco Caldeira

Serviço de Georreferenciação

  Av. A. José de Almeida – 1000-043 Lisboa

  Tel.+351 218426100 / ext.1438

francisco.calde...@ine.pt | www.ine.pt <http://www.ine.pt/>

  ___



cid:image001.gif@01cbc6ea.4a3b0560

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: terça-feira, 16 de janeiro de 2018 16:29
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



Hi Francisco,

You may be interested in this thread:
http://osgeo-org.1560.x6.nabble.com/Referencing-App-Schema-defined-feature-types-properties-in-styles-SLD-td5347766.html

long story short you should try to reference your property using a path 
relative to the root entity:



gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href



If this fix your issue please remember to update the related ticket !

Kind regards,

Nuno Oliveira

On 12/04/2017 11:08 AM, Francisco Caldeira wrote:

Hello,



Ok Nuno Oliveira, I’m going to create the issue on the bug tracker.



Thank you and all for the help!

Regards

F





cid:image001.gif@01cbc6ea.4a3b0560
Francisco Caldeira - Serviço de GeoInformação

I.N.E. - Instituto Nacional de Estatística
Avenida António José de Almeida
100-043 Lisboa
Portugal
francisco.calde...@ine.pt
(351) - 21 8426100
Ext. 1438

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: sexta-feira, 1 de dezembro de 2017 10:07
To: Andrea Aime
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



Sorry Andrea forgot to share the details indeed, my bad.

The inner exception is actually swallowed at some point (this should be 
fixed some way ... logging the exception ?), the relevant part is this one 
(full stacktrace attached):

java.lang.NullPointerException
at 
org.geotools.feature.xpath.FeatureTypeAttributePointer.(FeatureTypeAttributePointer.java:90)
at 
org.geotools.feature.xpath.SingleFeatureTypeAttributeIterator.getNodePointer(SingleFeatureTypeAttributeIterator.java:82)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.getCurrentNodePointer(ChildContext.java:57)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.prepare(ChildContext.java:108)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.setPosition(ChildContext.java:99)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.nextNode(ChildContext.java:87)
at 
org.apache.commons.jxpath.ri.EvalContext.performIteratorStep(EvalContext.java:155)
at 
org.apache.commons.jxpath.ri.EvalContext.hasNext(EvalContext.java:115)
at 
org.geotools.filter.expression.FeaturePropertyAccessorFactory$FeaturePropertyAccessor.get(FeaturePropertyAccessorFactory.java:269)
at 
org.geotools.filter.AttributeExpressionImpl.tryAccessor(AttributeExpressionImpl.java:248)
at 
org.geotools.filter.AttributeExpressionImpl.evaluate(AttributeExpressionImpl.java:220)
at 
org.geotools.filter.AttributeExpressionImpl.evaluate(AttributeExpressionImpl.java:189)
at 
org.geoserver.wms.map.GetMapKvpRequestReader.checkStyle(GetMapKvpRequestReader.java:1083)

Several strange things here:

*   since there is a XML related library in the middle I would expect some 
strange behavior like an assertion fail, custom exception, etc ... but not a 
NULL pointer exception for sure.
*   since we are dealing with a complex feature not sure why a 
SingleFeatureTypeAttributeIterator is being used.

So as far I can tell the used xpath looks fine, using the same path for 
filtering works just fine:

  




  st_gml32:Station_gml32/st_gml32:name


  station1






So it looks to me that there something wrong ... discovering what will 
require a deeper investigation, at least for me ... maybe someone else 
already stepped on this and knows what is going one ?

Independently of what is going here, complex feature feedbacks for when a 
property is not found needs to be improved.

@Franciso if you don't get more feedback on this I will suggest to you to go 
ahead and open an issue in the bug tracker:
http://geoserver.org/issues/

Cheers,

Nuno Oliveira

On 12/01/2017 09:05 AM, Andrea Aime wrote:

On Fri, Dec 1, 2017 at 10:02 AM, Nuno Oliveira 
 wrote:

Hi Andrea,
thanks for the heads up.

When I saw the properties check I also thought it was deactivated for 
complex feature, so I did a quick test where I deactivate the check ... we 
g

Re: [Geoserver-users] Appschema and Sld for WMS

2017-12-04 Thread Francisco Caldeira
Hello,



Ok Nuno Oliveira, I’m going to create the issue on the bug tracker.



Thank you and all for the help!

Regards

F





cid:image001.gif@01cbc6ea.4a3b0560
Francisco Caldeira - Serviço de GeoInformação

I.N.E. - Instituto Nacional de Estatística
Avenida António José de Almeida
100-043 Lisboa
Portugal
francisco.calde...@ine.pt
(351) - 21 8426100
Ext. 1438

From: Nuno Oliveira [mailto:nuno.olive...@geo-solutions.it]
Sent: sexta-feira, 1 de dezembro de 2017 10:07
To: Andrea Aime
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] Appschema and Sld for WMS



Sorry Andrea forgot to share the details indeed, my bad.

The inner exception is actually swallowed at some point (this should be 
fixed some way ... logging the exception ?), the relevant part is this one 
(full stacktrace attached):

java.lang.NullPointerException
at 
org.geotools.feature.xpath.FeatureTypeAttributePointer.(FeatureTypeAttributePointer.java:90)
at 
org.geotools.feature.xpath.SingleFeatureTypeAttributeIterator.getNodePointer(SingleFeatureTypeAttributeIterator.java:82)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.getCurrentNodePointer(ChildContext.java:57)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.prepare(ChildContext.java:108)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.setPosition(ChildContext.java:99)
at 
org.apache.commons.jxpath.ri.axes.ChildContext.nextNode(ChildContext.java:87)
at 
org.apache.commons.jxpath.ri.EvalContext.performIteratorStep(EvalContext.java:155)
at 
org.apache.commons.jxpath.ri.EvalContext.hasNext(EvalContext.java:115)
at 
org.geotools.filter.expression.FeaturePropertyAccessorFactory$FeaturePropertyAccessor.get(FeaturePropertyAccessorFactory.java:269)
at 
org.geotools.filter.AttributeExpressionImpl.tryAccessor(AttributeExpressionImpl.java:248)
at 
org.geotools.filter.AttributeExpressionImpl.evaluate(AttributeExpressionImpl.java:220)
at 
org.geotools.filter.AttributeExpressionImpl.evaluate(AttributeExpressionImpl.java:189)
at 
org.geoserver.wms.map.GetMapKvpRequestReader.checkStyle(GetMapKvpRequestReader.java:1083)

Several strange things here:

*   since there is a XML related library in the middle I would expect some 
strange behavior like an assertion fail, custom exception, etc ... but not a 
NULL pointer exception for sure.
*   since we are dealing with a complex feature not sure why a 
SingleFeatureTypeAttributeIterator is being used.

So as far I can tell the used xpath looks fine, using the same path for 
filtering works just fine:

  




  st_gml32:Station_gml32/st_gml32:name


  station1






So it looks to me that there something wrong ... discovering what will 
require a deeper investigation, at least for me ... maybe someone else 
already stepped on this and knows what is going one ?

Independently of what is going here, complex feature feedbacks for when a 
property is not found needs to be improved.

@Franciso if you don't get more feedback on this I will suggest to you to go 
ahead and open an issue in the bug tracker:
http://geoserver.org/issues/

Cheers,

Nuno Oliveira

On 12/01/2017 09:05 AM, Andrea Aime wrote:

On Fri, Dec 1, 2017 at 10:02 AM, Nuno Oliveira 
 wrote:

Hi Andrea,
thanks for the heads up.

When I saw the properties check I also thought it was deactivated for 
complex feature, so I did a quick test where I deactivate the check ... we 
get the same issue when trying to render the map.



I see... what's the full stack trace?

Wondering if there are checks at multiple levels, like, during rendering I 
was expecting more of a null if the property cannot be accessed.



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

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 m

[Geoserver-users] Appschema and Sld for WMS

2017-11-30 Thread Francisco Caldeira
  






gn:name/gn:GeographicalName/gn:sourceOfName



origem





xsi:nil

if_then_else(isNull(origem), 'true',
Expression.NIL)








gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName
/gn:script



'Latn'





xsi:nil

if_then_else(isNull('Latn'), 'true',
Expression.NIL)








gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName
/gn:text



designacao








gn:relatedSpatialObject/base:Identifier/base:localId



idlocalid








gn:relatedSpatialObject/base:Identifier/base:namespace



idnamspace








gn:relatedSpatialObject/base:Identifier/base:versionId



idversion





xsi:nil

if_then_else(isNull(idversion), 'true',
Expression.NIL)







    gn:type



xlink:href


strConcat('http://inspire.ec.europa.eu/codelist/NamedPlaceTypeValue
/', type)

















Have you got any ideia what’s wrong?





Thanks in advanced

Francisco



cid:image001.gif@01cbc6ea.4a3b0560
Francisco Caldeira - Serviço de GeoInformação

I.N.E. - Instituto Nacional de Estatística
Avenida António José de Almeida
100-043 Lisboa
Portugal
 <mailto:francisco.calde...@ine.pt> francisco.calde...@ine.pt
(351) - 21 8426100
Ext. 1438


"Confidencialidade: Esta mensagem (e eventuais ficheiros anexos) é destinada 
exclusivamente às pessoas nela indicadas e tem natureza confidencial. Se 
receber esta mensagem por engano, por favor contacte o remetente e elimine a 
mensagem e ficheiros, sem tomar conhecimento do respectivo conteúdo e sem 
reproduzi-la ou divulgá-la.
12345
Confidentiality Warning: This e-mail message (and any attached files) is 
confidential and is intended solely for the use of the individual or entity to 
whom it is addressed. lf you are not the intended recipient of this message 
please notify the sender and delete and destroy all copies immediately."

--
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-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users