Appschema and Sld for WMS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Appschema and Sld for WMS

Francisco Caldeira

Hello all,

 

I’m not an experienced user on Geoserver, so if this is a stupid question my apologies in advanced.

 

I have a service for the INSPIRE theme Geographical names, created with appschema extension.

 

It’s working fine for the WFS in the address:

 

http://inspire.ine.pt/geoserver/gn/wfs?

 

 

Not so good with WMS… I’m trying to define a Style to label a field like the INSPIRE directive defines,  which goes like this:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<StyledLayerDescriptor version="1.0.0"

 xsi:schemaLocation="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">

  <!-- a Named Layer is the basic building block of an SLD document -->

  <NamedLayer>

    <Name>GN Geographical Names</Name>

    <UserStyle>

    <!-- Styles can have names, titles and abstracts -->

      <Title>GN.NamedPlaced</Title>

      <Abstract>Label place name</Abstract>

      <FeatureTypeStyle>

        <Rule>

          <Name>GN.NamedPlaced.name</Name>

          <Title>Label with no outline</Title>

          <Abstract>A arial 10pt label  </Abstract>

   <TextSymbolizer>

     <Label>

       <ogc:PropertyName>gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href</ogc:PropertyName>

     </Label>

     <Font>

          <CssParameter name="font-family">Arial</CssParameter>

          <CssParameter name="font-size">10</CssParameter>

       </Font>

      <LabelPlacement>

          <PointPlacement>

            <AnchorPoint>

              <AnchorPointX>0.5</AnchorPointX>

              <AnchorPointY>0.5</AnchorPointY>

            </AnchorPoint>

            <Displacement>

              <DisplacementX>0</DisplacementX>

              <DisplacementY>0</DisplacementY>

            </Displacement>

          </PointPlacement>

        </LabelPlacement>    

   </TextSymbolizer>

        </Rule>

      </FeatureTypeStyle>

    </UserStyle>

  </NamedLayer>

</StyledLayerDescriptor>

 

 

The error I Receive is:

 

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

 

I understand I have to define an xpath, I have read it on the documentation. But  I’m not sure if I have done it correctly, tried several variations but none worked out.

 

This is the link for the WMS

 

http://inspire.ine.pt/geoserver/gn/wms?service=WMS&version=1.1.0&request=GetMap&layers=gn:NamedPlace&styles=&bbox=-119776.5078125,-301720.375,122336.6484375,278733.625&width=330&height=768&srs=EPSG:3763&format=application/openlayers

 

 

 

My appschema.xml  file goes like this. I’ trying to map the field

 

<targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

 

 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns3:AppSchemaDataAccess xmlns:ns2="http://www.opengis.net/ogc" xmlns:ns3="http://www.geotools.org/app-schema">

    <namespaces>

        <Namespace>

            <prefix>gn</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>

        </Namespace>

        <Namespace>

            <prefix>gml</prefix>

            <uri>http://www.opengis.net/gml/3.2</uri>

        </Namespace>

        <Namespace>

            <prefix>base</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>

        </Namespace>

        <Namespace>

            <prefix>gmd</prefix>

            <uri>http://www.isotc211.org/2005/gmd</uri>

        </Namespace>

        <Namespace>

            <prefix>gco</prefix>

            <uri>http://www.isotc211.org/2005/gco</uri>

        </Namespace>

        <Namespace>

            <prefix>xlink</prefix>

            <uri>http://www.w3.org/1999/xlink</uri>

        </Namespace>

        <Namespace>

            <prefix>xsi</prefix>

            <uri>http://www.w3.org/2001/XMLSchema-instance</uri>

        </Namespace>

    </namespaces>

    <includedTypes/>

    <sourceDataStores>

        <DataStore>

            <id>dataStore</id>

            <parameters>

                <Parameter>

                    <name>Connection timeout</name>

                    <value>20</value>

                </Parameter>

                <Parameter>

                    <name>port</name>

                    <value>5432</value>

                </Parameter>

                <Parameter>

                    <name>passwd</name>

                    <value>fakepass</value>

                </Parameter>

                <Parameter>

                    <name>dbtype</name>

                    <value>postgis</value>

                </Parameter>

                <Parameter>

                    <name>encode functions</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>Evictor run periodicity</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>namespace</name>

                    <value></value>

                </Parameter>

                <Parameter>

                    <name>schema</name>

                    <value>fakeschema</value>

                </Parameter>

                <Parameter>

                    <name>create database</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>fetch size</name>

                    <value>1000</value>

                </Parameter>

                <Parameter>

                    <name>preparedStatements</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>min connections</name>

                    <value>1</value>

                </Parameter>

                <Parameter>

                    <name>Evictor tests per run</name>

                    <value>3</value>

                </Parameter>

                <Parameter>

                    <name>host</name>

                    <value>fakehost</value>

                </Parameter>

                <Parameter>

                    <name>validate connections</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>max connections</name>

                    <value>10</value>

                </Parameter>

                <Parameter>

                    <name>database</name>

                    <value>fakedb</value>

                </Parameter>

                <Parameter>

                    <name>Support on the fly geometry simplification</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max connection idle time</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>Test while idle</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Loose bbox</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Expose primary keys</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max open prepared statements</name>

                    <value>50</value>

                </Parameter>

                <Parameter>

                    <name>Estimated extends</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>user</name>

                    <value>fakeuser</value>

                </Parameter>

            </parameters>

        </DataStore>

    </sourceDataStores>

    <targetTypes>

        <FeatureType>

            <schemaUri>http://inspire.ec.europa.eu/schemas/gn/4.0/GeographicalNames.xsd</schemaUri>

        </FeatureType>

    </targetTypes>

    <typeMappings>

        <FeatureTypeMapping>

            <sourceDataStore>dataStore</sourceDataStore>

            <sourceType>GN_GeographicalNames_PT</sourceType>

            <targetElement>gn:NamedPlace</targetElement>

            <attributeMappings>

                <AttributeMapping>

                    <targetAttribute>gn:beginLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>beginlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(beginlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:endLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>endlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(endlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:geometry</targetAttribute>

                    <sourceExpression>

                        <OCQL>geom</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:NamedPlace</targetAttribute>

                    <idExpression>

                        <OCQL>strConcat('PT.GN.', id)</OCQL>

                    </idExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>localid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>'http://id.igeo.pt/so/GN/NamedPlaced'</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>versionid</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(versionid), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:leastDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>leastscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:mostDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>mostscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalGender</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalGenderValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalNumber</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalNumberValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:language</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Por'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Por'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nameStatus</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NameStatusValue/', nstatus)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nativeness</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NativenessValue/', nativeness)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:pronunciation</targetAttribute>

                    <encodeIfEmpty>true</encodeIfEmpty>

                    <ClientProperty>

                        <name>nilReason</name>

                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>

                    </ClientProperty>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'), Expression.NIL, 'true')</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:sourceOfName</targetAttribute>

                    <sourceExpression>

                        <OCQL>origem</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(origem), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Latn'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Latn'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

                    <sourceExpression>

                        <OCQL>designacao</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idlocalid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>idnamspace</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idversion</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(idversion), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:type</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

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

                    </ClientProperty>

                </AttributeMapping>

            </attributeMappings>

        </FeatureTypeMapping>

    </typeMappings>

</ns3:AppSchemaDataAccess>

 

 

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
[hidden email]
(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.

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

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

Reply | Threaded
Open this post in threaded view
|

Re: Appschema and Sld for WMS

Nuno Oliveira-3
Hi Francisco,

I have done a quick test with a test dataset .... and indeed I'm having the same exception.
I did a quick debug and it seems that something is not working as it should, filtering works fine but accessing the property of a complex feature in a style fails.

Wondering if anyone experienced a similar issue when using App-Schema ?

Regards,

Nuno Oliveira
 

On 11/30/2017 11:03 AM, Francisco Caldeira wrote:

Hello all,

 

I’m not an experienced user on Geoserver, so if this is a stupid question my apologies in advanced.

 

I have a service for the INSPIRE theme Geographical names, created with appschema extension.

 

It’s working fine for the WFS in the address:

 

http://inspire.ine.pt/geoserver/gn/wfs?

 

 

Not so good with WMS… I’m trying to define a Style to label a field like the INSPIRE directive defines,  which goes like this:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<StyledLayerDescriptor version="1.0.0"

 xsi:schemaLocation="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">

  <!-- a Named Layer is the basic building block of an SLD document -->

  <NamedLayer>

    <Name>GN Geographical Names</Name>

    <UserStyle>

    <!-- Styles can have names, titles and abstracts -->

      <Title>GN.NamedPlaced</Title>

      <Abstract>Label place name</Abstract>

      <FeatureTypeStyle>

        <Rule>

          <Name>GN.NamedPlaced.name</Name>

          <Title>Label with no outline</Title>

          <Abstract>A arial 10pt label  </Abstract>

   <TextSymbolizer>

     <Label>

       <ogc:PropertyName>gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href</ogc:PropertyName>

     </Label>

     <Font>

          <CssParameter name="font-family">Arial</CssParameter>

          <CssParameter name="font-size">10</CssParameter>

       </Font>

      <LabelPlacement>

          <PointPlacement>

            <AnchorPoint>

              <AnchorPointX>0.5</AnchorPointX>

              <AnchorPointY>0.5</AnchorPointY>

            </AnchorPoint>

            <Displacement>

              <DisplacementX>0</DisplacementX>

              <DisplacementY>0</DisplacementY>

            </Displacement>

          </PointPlacement>

        </LabelPlacement>    

   </TextSymbolizer>

        </Rule>

      </FeatureTypeStyle>

    </UserStyle>

  </NamedLayer>

</StyledLayerDescriptor>

 

 

The error I Receive is:

 

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

 

I understand I have to define an xpath, I have read it on the documentation. But  I’m not sure if I have done it correctly, tried several variations but none worked out.

 

This is the link for the WMS

 

http://inspire.ine.pt/geoserver/gn/wms?service=WMS&version=1.1.0&request=GetMap&layers=gn:NamedPlace&styles=&bbox=-119776.5078125,-301720.375,122336.6484375,278733.625&width=330&height=768&srs=EPSG:3763&format=application/openlayers

 

 

 

My appschema.xml  file goes like this. I’ trying to map the field

 

<targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

 

 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns3:AppSchemaDataAccess xmlns:ns2="http://www.opengis.net/ogc" xmlns:ns3="http://www.geotools.org/app-schema">

    <namespaces>

        <Namespace>

            <prefix>gn</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>

        </Namespace>

        <Namespace>

            <prefix>gml</prefix>

            <uri>http://www.opengis.net/gml/3.2</uri>

        </Namespace>

        <Namespace>

            <prefix>base</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>

        </Namespace>

        <Namespace>

            <prefix>gmd</prefix>

            <uri>http://www.isotc211.org/2005/gmd</uri>

        </Namespace>

        <Namespace>

            <prefix>gco</prefix>

            <uri>http://www.isotc211.org/2005/gco</uri>

        </Namespace>

        <Namespace>

            <prefix>xlink</prefix>

            <uri>http://www.w3.org/1999/xlink</uri>

        </Namespace>

        <Namespace>

            <prefix>xsi</prefix>

            <uri>http://www.w3.org/2001/XMLSchema-instance</uri>

        </Namespace>

    </namespaces>

    <includedTypes/>

    <sourceDataStores>

        <DataStore>

            <id>dataStore</id>

            <parameters>

                <Parameter>

                    <name>Connection timeout</name>

                    <value>20</value>

                </Parameter>

                <Parameter>

                    <name>port</name>

                    <value>5432</value>

                </Parameter>

                <Parameter>

                    <name>passwd</name>

                    <value>fakepass</value>

                </Parameter>

                <Parameter>

                    <name>dbtype</name>

                    <value>postgis</value>

                </Parameter>

                <Parameter>

                    <name>encode functions</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>Evictor run periodicity</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>namespace</name>

                    <value></value>

                </Parameter>

                <Parameter>

                    <name>schema</name>

                    <value>fakeschema</value>

                </Parameter>

                <Parameter>

                    <name>create database</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>fetch size</name>

                    <value>1000</value>

                </Parameter>

                <Parameter>

                    <name>preparedStatements</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>min connections</name>

                    <value>1</value>

                </Parameter>

                <Parameter>

                    <name>Evictor tests per run</name>

                    <value>3</value>

                </Parameter>

                <Parameter>

                    <name>host</name>

                    <value>fakehost</value>

                </Parameter>

                <Parameter>

                    <name>validate connections</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>max connections</name>

                    <value>10</value>

                </Parameter>

                <Parameter>

                    <name>database</name>

                    <value>fakedb</value>

                </Parameter>

                <Parameter>

                    <name>Support on the fly geometry simplification</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max connection idle time</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>Test while idle</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Loose bbox</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Expose primary keys</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max open prepared statements</name>

                    <value>50</value>

                </Parameter>

                <Parameter>

                    <name>Estimated extends</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>user</name>

                    <value>fakeuser</value>

                </Parameter>

            </parameters>

        </DataStore>

    </sourceDataStores>

    <targetTypes>

        <FeatureType>

            <schemaUri>http://inspire.ec.europa.eu/schemas/gn/4.0/GeographicalNames.xsd</schemaUri>

        </FeatureType>

    </targetTypes>

    <typeMappings>

        <FeatureTypeMapping>

            <sourceDataStore>dataStore</sourceDataStore>

            <sourceType>GN_GeographicalNames_PT</sourceType>

            <targetElement>gn:NamedPlace</targetElement>

            <attributeMappings>

                <AttributeMapping>

                    <targetAttribute>gn:beginLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>beginlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(beginlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:endLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>endlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(endlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:geometry</targetAttribute>

                    <sourceExpression>

                        <OCQL>geom</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:NamedPlace</targetAttribute>

                    <idExpression>

                        <OCQL>strConcat('PT.GN.', id)</OCQL>

                    </idExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>localid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>'http://id.igeo.pt/so/GN/NamedPlaced'</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>versionid</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(versionid), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:leastDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>leastscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:mostDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>mostscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalGender</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalGenderValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalNumber</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalNumberValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:language</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Por'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Por'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nameStatus</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NameStatusValue/', nstatus)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nativeness</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NativenessValue/', nativeness)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:pronunciation</targetAttribute>

                    <encodeIfEmpty>true</encodeIfEmpty>

                    <ClientProperty>

                        <name>nilReason</name>

                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>

                    </ClientProperty>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'), Expression.NIL, 'true')</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:sourceOfName</targetAttribute>

                    <sourceExpression>

                        <OCQL>origem</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(origem), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Latn'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Latn'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

                    <sourceExpression>

                        <OCQL>designacao</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idlocalid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>idnamspace</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idversion</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(idversion), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:type</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

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

                    </ClientProperty>

                </AttributeMapping>

            </attributeMappings>

        </FeatureTypeMapping>

    </typeMappings>

</ns3:AppSchemaDataAccess>

 

 

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
[hidden email]
(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.

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

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

-- 
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, 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.

------------------------------------------------------------------------------
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

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

Re: Appschema and Sld for WMS

geowolf
Hi Nuno,
that error seems the style validation check that we put many years ago to avoid issues with people writing
the wrong property names in styles and then wondering why the style was not rendering anything.

However I thought the check was disabled for complex features... if it is not, maybe the path is crossing
over an element that uses inheritance and thus cannot be followed fully, resulting in an empty
evaluation that would trigger the error?

Cheers
Andrea


On Fri, Dec 1, 2017 at 1:03 AM, Nuno Oliveira <[hidden email]> wrote:
Hi Francisco,

I have done a quick test with a test dataset .... and indeed I'm having the same exception.
I did a quick debug and it seems that something is not working as it should, filtering works fine but accessing the property of a complex feature in a style fails.

Wondering if anyone experienced a similar issue when using App-Schema ?

Regards,

Nuno Oliveira
 

On 11/30/2017 11:03 AM, Francisco Caldeira wrote:

Hello all,

 

I’m not an experienced user on Geoserver, so if this is a stupid question my apologies in advanced.

 

I have a service for the INSPIRE theme Geographical names, created with appschema extension.

 

It’s working fine for the WFS in the address:

 

http://inspire.ine.pt/geoserver/gn/wfs?

 

 

Not so good with WMS… I’m trying to define a Style to label a field like the INSPIRE directive defines,  which goes like this:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<StyledLayerDescriptor version="1.0.0"

 xsi:schemaLocation="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">

  <!-- a Named Layer is the basic building block of an SLD document -->

  <NamedLayer>

    <Name>GN Geographical Names</Name>

    <UserStyle>

    <!-- Styles can have names, titles and abstracts -->

      <Title>GN.NamedPlaced</Title>

      <Abstract>Label place name</Abstract>

      <FeatureTypeStyle>

        <Rule>

          <Name>GN.NamedPlaced.name</Name>

          <Title>Label with no outline</Title>

          <Abstract>A arial 10pt label  </Abstract>

   <TextSymbolizer>

     <Label>

       <ogc:PropertyName>gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href</ogc:PropertyName>

     </Label>

     <Font>

          <CssParameter name="font-family">Arial</CssParameter>

          <CssParameter name="font-size">10</CssParameter>

       </Font>

      <LabelPlacement>

          <PointPlacement>

            <AnchorPoint>

              <AnchorPointX>0.5</AnchorPointX>

              <AnchorPointY>0.5</AnchorPointY>

            </AnchorPoint>

            <Displacement>

              <DisplacementX>0</DisplacementX>

              <DisplacementY>0</DisplacementY>

            </Displacement>

          </PointPlacement>

        </LabelPlacement>    

   </TextSymbolizer>

        </Rule>

      </FeatureTypeStyle>

    </UserStyle>

  </NamedLayer>

</StyledLayerDescriptor>

 

 

The error I Receive is:

 

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

 

I understand I have to define an xpath, I have read it on the documentation. But  I’m not sure if I have done it correctly, tried several variations but none worked out.

 

This is the link for the WMS

 

http://inspire.ine.pt/geoserver/gn/wms?service=WMS&version=1.1.0&request=GetMap&layers=gn:NamedPlace&styles=&bbox=-119776.5078125,-301720.375,122336.6484375,278733.625&width=330&height=768&srs=EPSG:3763&format=application/openlayers

 

 

 

My appschema.xml  file goes like this. I’ trying to map the field

 

<targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

 

 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns3:AppSchemaDataAccess xmlns:ns2="http://www.opengis.net/ogc" xmlns:ns3="http://www.geotools.org/app-schema">

    <namespaces>

        <Namespace>

            <prefix>gn</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>

        </Namespace>

        <Namespace>

            <prefix>gml</prefix>

            <uri>http://www.opengis.net/gml/3.2</uri>

        </Namespace>

        <Namespace>

            <prefix>base</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>

        </Namespace>

        <Namespace>

            <prefix>gmd</prefix>

            <uri>http://www.isotc211.org/2005/gmd</uri>

        </Namespace>

        <Namespace>

            <prefix>gco</prefix>

            <uri>http://www.isotc211.org/2005/gco</uri>

        </Namespace>

        <Namespace>

            <prefix>xlink</prefix>

            <uri>http://www.w3.org/1999/xlink</uri>

        </Namespace>

        <Namespace>

            <prefix>xsi</prefix>

            <uri>http://www.w3.org/2001/XMLSchema-instance</uri>

        </Namespace>

    </namespaces>

    <includedTypes/>

    <sourceDataStores>

        <DataStore>

            <id>dataStore</id>

            <parameters>

                <Parameter>

                    <name>Connection timeout</name>

                    <value>20</value>

                </Parameter>

                <Parameter>

                    <name>port</name>

                    <value>5432</value>

                </Parameter>

                <Parameter>

                    <name>passwd</name>

                    <value>fakepass</value>

                </Parameter>

                <Parameter>

                    <name>dbtype</name>

                    <value>postgis</value>

                </Parameter>

                <Parameter>

                    <name>encode functions</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>Evictor run periodicity</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>namespace</name>

                    <value></value>

                </Parameter>

                <Parameter>

                    <name>schema</name>

                    <value>fakeschema</value>

                </Parameter>

                <Parameter>

                    <name>create database</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>fetch size</name>

                    <value>1000</value>

                </Parameter>

                <Parameter>

                    <name>preparedStatements</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>min connections</name>

                    <value>1</value>

                </Parameter>

                <Parameter>

                    <name>Evictor tests per run</name>

                    <value>3</value>

                </Parameter>

                <Parameter>

                    <name>host</name>

                    <value>fakehost</value>

                </Parameter>

                <Parameter>

                    <name>validate connections</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>max connections</name>

                    <value>10</value>

                </Parameter>

                <Parameter>

                    <name>database</name>

                    <value>fakedb</value>

                </Parameter>

                <Parameter>

                    <name>Support on the fly geometry simplification</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max connection idle time</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>Test while idle</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Loose bbox</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Expose primary keys</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max open prepared statements</name>

                    <value>50</value>

                </Parameter>

                <Parameter>

                    <name>Estimated extends</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>user</name>

                    <value>fakeuser</value>

                </Parameter>

            </parameters>

        </DataStore>

    </sourceDataStores>

    <targetTypes>

        <FeatureType>

            <schemaUri>http://inspire.ec.europa.eu/schemas/gn/4.0/GeographicalNames.xsd</schemaUri>

        </FeatureType>

    </targetTypes>

    <typeMappings>

        <FeatureTypeMapping>

            <sourceDataStore>dataStore</sourceDataStore>

            <sourceType>GN_GeographicalNames_PT</sourceType>

            <targetElement>gn:NamedPlace</targetElement>

            <attributeMappings>

                <AttributeMapping>

                    <targetAttribute>gn:beginLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>beginlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(beginlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:endLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>endlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(endlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:geometry</targetAttribute>

                    <sourceExpression>

                        <OCQL>geom</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:NamedPlace</targetAttribute>

                    <idExpression>

                        <OCQL>strConcat('PT.GN.', id)</OCQL>

                    </idExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>localid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>'http://id.igeo.pt/so/GN/NamedPlaced'</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>versionid</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(versionid), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:leastDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>leastscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:mostDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>mostscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalGender</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalGenderValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalNumber</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalNumberValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:language</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Por'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Por'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nameStatus</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NameStatusValue/', nstatus)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nativeness</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NativenessValue/', nativeness)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:pronunciation</targetAttribute>

                    <encodeIfEmpty>true</encodeIfEmpty>

                    <ClientProperty>

                        <name>nilReason</name>

                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>

                    </ClientProperty>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'), Expression.NIL, 'true')</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:sourceOfName</targetAttribute>

                    <sourceExpression>

                        <OCQL>origem</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(origem), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Latn'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Latn'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

                    <sourceExpression>

                        <OCQL>designacao</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idlocalid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>idnamspace</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idversion</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(idversion), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:type</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

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

                    </ClientProperty>

                </AttributeMapping>

            </attributeMappings>

        </FeatureTypeMapping>

    </typeMappings>

</ns3:AppSchemaDataAccess>

 

 

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
[hidden email]
(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.

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

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

-- 
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: <a href="tel:+39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313
fax:      <a href="tel:+39%200584%20166%200272" value="+3905841660272" target="_blank">+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, 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.

------------------------------------------------------------------------------
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

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




--

Regards,

Andrea Aime

==
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.



------------------------------------------------------------------------------
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

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

Re: Appschema and Sld for WMS

Nuno Oliveira-3
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.

On 12/01/2017 07:40 AM, Andrea Aime wrote:
Hi Nuno,
that error seems the style validation check that we put many years ago to avoid issues with people writing
the wrong property names in styles and then wondering why the style was not rendering anything.

However I thought the check was disabled for complex features... if it is not, maybe the path is crossing
over an element that uses inheritance and thus cannot be followed fully, resulting in an empty
evaluation that would trigger the error?

Cheers
Andrea


On Fri, Dec 1, 2017 at 1:03 AM, Nuno Oliveira <[hidden email]> wrote:
Hi Francisco,

I have done a quick test with a test dataset .... and indeed I'm having the same exception.
I did a quick debug and it seems that something is not working as it should, filtering works fine but accessing the property of a complex feature in a style fails.

Wondering if anyone experienced a similar issue when using App-Schema ?

Regards,

Nuno Oliveira
 

On 11/30/2017 11:03 AM, Francisco Caldeira wrote:

Hello all,

 

I’m not an experienced user on Geoserver, so if this is a stupid question my apologies in advanced.

 

I have a service for the INSPIRE theme Geographical names, created with appschema extension.

 

It’s working fine for the WFS in the address:

 

http://inspire.ine.pt/geoserver/gn/wfs?

 

 

Not so good with WMS… I’m trying to define a Style to label a field like the INSPIRE directive defines,  which goes like this:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<StyledLayerDescriptor version="1.0.0"

 xsi:schemaLocation="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">

  <!-- a Named Layer is the basic building block of an SLD document -->

  <NamedLayer>

    <Name>GN Geographical Names</Name>

    <UserStyle>

    <!-- Styles can have names, titles and abstracts -->

      <Title>GN.NamedPlaced</Title>

      <Abstract>Label place name</Abstract>

      <FeatureTypeStyle>

        <Rule>

          <Name>GN.NamedPlaced.name</Name>

          <Title>Label with no outline</Title>

          <Abstract>A arial 10pt label  </Abstract>

   <TextSymbolizer>

     <Label>

       <ogc:PropertyName>gn:NamedPlace/gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href</ogc:PropertyName>

     </Label>

     <Font>

          <CssParameter name="font-family">Arial</CssParameter>

          <CssParameter name="font-size">10</CssParameter>

       </Font>

      <LabelPlacement>

          <PointPlacement>

            <AnchorPoint>

              <AnchorPointX>0.5</AnchorPointX>

              <AnchorPointY>0.5</AnchorPointY>

            </AnchorPoint>

            <Displacement>

              <DisplacementX>0</DisplacementX>

              <DisplacementY>0</DisplacementY>

            </Displacement>

          </PointPlacement>

        </LabelPlacement>    

   </TextSymbolizer>

        </Rule>

      </FeatureTypeStyle>

    </UserStyle>

  </NamedLayer>

</StyledLayerDescriptor>

 

 

The error I Receive is:

 

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

 

I understand I have to define an xpath, I have read it on the documentation. But  I’m not sure if I have done it correctly, tried several variations but none worked out.

 

This is the link for the WMS

 

http://inspire.ine.pt/geoserver/gn/wms?service=WMS&version=1.1.0&request=GetMap&layers=gn:NamedPlace&styles=&bbox=-119776.5078125,-301720.375,122336.6484375,278733.625&width=330&height=768&srs=EPSG:3763&format=application/openlayers

 

 

 

My appschema.xml  file goes like this. I’ trying to map the field

 

<targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

 

 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns3:AppSchemaDataAccess xmlns:ns2="http://www.opengis.net/ogc" xmlns:ns3="http://www.geotools.org/app-schema">

    <namespaces>

        <Namespace>

            <prefix>gn</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>

        </Namespace>

        <Namespace>

            <prefix>gml</prefix>

            <uri>http://www.opengis.net/gml/3.2</uri>

        </Namespace>

        <Namespace>

            <prefix>base</prefix>

            <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>

        </Namespace>

        <Namespace>

            <prefix>gmd</prefix>

            <uri>http://www.isotc211.org/2005/gmd</uri>

        </Namespace>

        <Namespace>

            <prefix>gco</prefix>

            <uri>http://www.isotc211.org/2005/gco</uri>

        </Namespace>

        <Namespace>

            <prefix>xlink</prefix>

            <uri>http://www.w3.org/1999/xlink</uri>

        </Namespace>

        <Namespace>

            <prefix>xsi</prefix>

            <uri>http://www.w3.org/2001/XMLSchema-instance</uri>

        </Namespace>

    </namespaces>

    <includedTypes/>

    <sourceDataStores>

        <DataStore>

            <id>dataStore</id>

            <parameters>

                <Parameter>

                    <name>Connection timeout</name>

                    <value>20</value>

                </Parameter>

                <Parameter>

                    <name>port</name>

                    <value>5432</value>

                </Parameter>

                <Parameter>

                    <name>passwd</name>

                    <value>fakepass</value>

                </Parameter>

                <Parameter>

                    <name>dbtype</name>

                    <value>postgis</value>

                </Parameter>

                <Parameter>

                    <name>encode functions</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>Evictor run periodicity</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>namespace</name>

                    <value></value>

                </Parameter>

                <Parameter>

                    <name>schema</name>

                    <value>fakeschema</value>

                </Parameter>

                <Parameter>

                    <name>create database</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>fetch size</name>

                    <value>1000</value>

                </Parameter>

                <Parameter>

                    <name>preparedStatements</name>

                    <value>false</value>

                </Parameter>

                <Parameter>

                    <name>min connections</name>

                    <value>1</value>

                </Parameter>

                <Parameter>

                    <name>Evictor tests per run</name>

                    <value>3</value>

                </Parameter>

                <Parameter>

                    <name>host</name>

                    <value>fakehost</value>

                </Parameter>

                <Parameter>

                    <name>validate connections</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>max connections</name>

                    <value>10</value>

                </Parameter>

                <Parameter>

                    <name>database</name>

                    <value>fakedb</value>

                </Parameter>

                <Parameter>

                    <name>Support on the fly geometry simplification</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max connection idle time</name>

                    <value>300</value>

                </Parameter>

                <Parameter>

                    <name>Test while idle</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Loose bbox</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Expose primary keys</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>Max open prepared statements</name>

                    <value>50</value>

                </Parameter>

                <Parameter>

                    <name>Estimated extends</name>

                    <value>true</value>

                </Parameter>

                <Parameter>

                    <name>user</name>

                    <value>fakeuser</value>

                </Parameter>

            </parameters>

        </DataStore>

    </sourceDataStores>

    <targetTypes>

        <FeatureType>

            <schemaUri>http://inspire.ec.europa.eu/schemas/gn/4.0/GeographicalNames.xsd</schemaUri>

        </FeatureType>

    </targetTypes>

    <typeMappings>

        <FeatureTypeMapping>

            <sourceDataStore>dataStore</sourceDataStore>

            <sourceType>GN_GeographicalNames_PT</sourceType>

            <targetElement>gn:NamedPlace</targetElement>

            <attributeMappings>

                <AttributeMapping>

                    <targetAttribute>gn:beginLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>beginlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(beginlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:endLifespanVersion</targetAttribute>

                    <sourceExpression>

                        <OCQL>endlspan</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(endlspan), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:geometry</targetAttribute>

                    <sourceExpression>

                        <OCQL>geom</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:NamedPlace</targetAttribute>

                    <idExpression>

                        <OCQL>strConcat('PT.GN.', id)</OCQL>

                    </idExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>localid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>'http://id.igeo.pt/so/GN/NamedPlaced'</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:inspireId/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>versionid</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(versionid), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:leastDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>leastscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:mostDetailedViewingResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer</targetAttribute>

                    <sourceExpression>

                        <OCQL>mostscale</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalGender</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalGenderValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:grammaticalNumber</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/GrammaticalNumberValue/', gender)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:language</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Por'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Por'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nameStatus</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NameStatusValue/', nstatus)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:nativeness</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

                        <value>strConcat('http://inspire.ec.europa.eu/codelist/NativenessValue/', nativeness)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:pronunciation</targetAttribute>

                    <encodeIfEmpty>true</encodeIfEmpty>

                    <ClientProperty>

                        <name>nilReason</name>

                        <value>'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>

                    </ClientProperty>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'), Expression.NIL, 'true')</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:sourceOfName</targetAttribute>

                    <sourceExpression>

                        <OCQL>origem</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(origem), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>

                    <sourceExpression>

                        <OCQL>'Latn'</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull('Latn'), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>

                    <sourceExpression>

                        <OCQL>designacao</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:localId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idlocalid</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:namespace</targetAttribute>

                    <sourceExpression>

                        <OCQL>idnamspace</OCQL>

                    </sourceExpression>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:relatedSpatialObject/base:Identifier/base:versionId</targetAttribute>

                    <sourceExpression>

                        <OCQL>idversion</OCQL>

                    </sourceExpression>

                    <ClientProperty>

                        <name>xsi:nil</name>

                        <value>if_then_else(isNull(idversion), 'true', Expression.NIL)</value>

                    </ClientProperty>

                </AttributeMapping>

                <AttributeMapping>

                    <targetAttribute>gn:type</targetAttribute>

                    <ClientProperty>

                        <name>xlink:href</name>

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

                    </ClientProperty>

                </AttributeMapping>

            </attributeMappings>

        </FeatureTypeMapping>

    </typeMappings>

</ns3:AppSchemaDataAccess>

 

 

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
[hidden email]
(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.

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

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

-- 
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: <a href="tel:+39%200584%20962313" value="+390584962313" target="_blank" moz-do-not-send="true">+39 0584 962313
fax:      <a href="tel:+39%200584%20166%200272" value="+3905841660272" target="_blank" moz-do-not-send="true">+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, 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.

------------------------------------------------------------------------------
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

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




--

Regards,

Andrea Aime

== 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.


-- 
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, 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.

------------------------------------------------------------------------------
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

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

Re: Appschema and Sld for WMS

geowolf
On Fri, Dec 1, 2017 at 10:02 AM, Nuno Oliveira <[hidden email]> 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 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.



------------------------------------------------------------------------------
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

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

Re: Appschema and Sld for WMS

Nuno Oliveira-3
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.<init>(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:

  <wfs:Query typeName="st_gml32:Station_gml32">
        <ogc:Filter>
            <ogc:Filter>
                <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>
                          st_gml32:Station_gml32/st_gml32:name
                    </ogc:PropertyName>
                    <ogc:Literal>
                          station1
                    </ogc:Literal>
                </ogc:PropertyIsEqualTo>
            </ogc:Filter>
        </ogc:Filter>
    </wfs:Query>

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 <[hidden email]> 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 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.


-- 
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, 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.

------------------------------------------------------------------------------
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

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

stack_trace (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Appschema and Sld for WMS

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
[hidden email]
(351) - 21 8426100
Ext. 1438

From: Nuno Oliveira [mailto:[hidden email]]
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.<init>(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:

  <wfs:Query typeName="st_gml32:Station_gml32">
        <ogc:Filter>
            <ogc:Filter>
                <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>
                          st_gml32:Station_gml32/st_gml32:name
                    </ogc:PropertyName>
                    <ogc:Literal>
                          station1
                    </ogc:Literal>
                </ogc:PropertyIsEqualTo>
            </ogc:Filter>
        </ogc:Filter>
    </wfs:Query>

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 <[hidden email]> 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 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.



-- 
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, 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.

"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.

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

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

Reply | Threaded
Open this post in threaded view
|

Re: Appschema and Sld for WMS

Nuno Oliveira-3
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:

<ogc:PropertyName>gn:name/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text/@xlink:href</ogc:PropertyName>

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
[hidden email]
(351) - 21 8426100
Ext. 1438

From: Nuno Oliveira [[hidden email]]
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.<init>(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:

  <wfs:Query typeName="st_gml32:Station_gml32">
        <ogc:Filter>
            <ogc:Filter>
                <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>
                          st_gml32:Station_gml32/st_gml32:name
                    </ogc:PropertyName>
                    <ogc:Literal>
                          station1
                    </ogc:Literal>
                </ogc:PropertyIsEqualTo>
            </ogc:Filter>
        </ogc:Filter>
    </wfs:Query>

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 <[hidden email]> 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 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.



-- 
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, 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.

"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.

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

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

-- 
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, 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.

------------------------------------------------------------------------------
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

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