|
Francisco Caldeira created an issue |
Issue Type: |
|
---|---|
Affects Versions: |
2.8.2 |
Assignee: |
Unassigned |
Components: |
Application schema |
Created: |
04/Dec/17 5:26 PM |
Environment: |
Linux Centos 7 |
Priority: |
|
Reporter: |
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 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> Regards |
Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS |
|
This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100074-sha1:b63a608) |
|