Hi Ben,
I tried that solution, using just one attributeMapping element:
<AttributeMapping>
<targetAttribute>
gml:domainSet
</targetAttribute>
<sourceExpression>
<OCQL>'POLYGON((268926 4810180, 268926 4829560, 296474 4829560,
296474 4810180))'</OCQL>
</sourceExpression>
<targetAttributeNode>
gml:MultiSurfacePropertyType
</targetAttributeNode>
</AttributeMapping>
But it didn't work and I got the same behavior.
It also didn't work using the geometry column of a shapefile.
I think I'll try to debug GeoServer + app-schema source code to see if it helps
me to understand how this works.
I'll let you know if I make any progress.
Best regards.
Ruben Velasco.
-----Mensaje original-----
De: Ben Caradoc-Davies [mailto:[email protected]]
Enviado el: miércoles, 24 de agosto de 2011 0:45
Para: Ruben Velasco Vega
CC: [email protected]
Asunto: Re: [Geoserver-users] App-Schema: Mapping gml:AbstractGeometry
Ruben,
you have two attributeMapping elements for one targetAttribute. Please
try merging them into a single element containing one targetAttribute,
one targetAttributeNode, and one sourceExpression. Normally separate
elements are used because the property element has a path one step
shorter, but I suspect your mapping is almost correct because geometry
properties are handled differently.
I have never tried to use CQL to deliver a literal geometry in this way.
Please let us know if it works! (I am in a conference [ISDE7] today and
tomorrow and cannot test your mapping until Friday.)
Kind regards,
Ben.
On 23/08/11 20:20, Ruben Velasco Vega wrote:
> Hi,
>
> First of all let me put you in situation. I’m working on the mapping of the
> INSPIRE Annex II Land Cover schema. I’m using GeoServer 2.2 + app-schema. I
> tried GS 2.1, but I moved to 2.2 when I read this issue:
> http://jira.codehaus.org/browse/GEOS-4496
>
> I need to map the attribute “gml:domainSet” which has this definition:
>
> <element name="domainSet" type="gml:DomainSetType">
> <annotation>
>
> <documentation>…</documentation>
> </annotation>
> </element>
> <complexType name="DomainSetType">
> <sequence minOccurs="0">
> <choice>
> <element
> ref="gml:AbstractGeometry"/>
> <element
> ref="gml:AbstractTimeObject"/>
> </choice>
> </sequence>
> <attributeGroup
> ref="gml:OwnershipAttributeGroup"/>
> <attributeGroup
> ref="gml:AssociationAttributeGroup"/>
> </complexType>
>
>
> I want to use an explicit polygon so I wrote the mapping this way:
>
>
> <AttributeMapping>
> <targetAttribute>
> gml:domainSet
> </targetAttribute>
> <targetAttributeNode>
>
> gml:MultiSurfacePropertyType
> </targetAttributeNode>
> </AttributeMapping>
>
> <AttributeMapping>
> <targetAttribute>
> gml:domainSet
> </targetAttribute>
> <sourceExpression>
> <OCQL>'POLYGON((268926 4810180,
> 268926 4829560, 296474 4829560, 296474 4810180))'</OCQL>
> </sourceExpression>
> </AttributeMapping>
>
> When I make this request:
> http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=lcs:LandCoverSurfaceCoverage&outputFormat=text/xml;%20subtype=gml/3.2
>
> I get this response:
>
> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" ...
> <wfs:member>
> <lcs:LandCoverSurfaceCoverage gml:id="land_cover_coverages.1">
>
> [DOMAINSET SHOULD BE HERE]
>
> <cvgvp:domainExtent>
> <gmd:EX_Extent>
> …
> …
>
> In the GeoServer log (with the GEOTOOLS_DEVELOPER_LOGGING.properties profie)
> I find this pair of lines that maybe related to this problem:
>
> 2011-08-23 13:11:09,550 DEBUG [org.geotools.xml] - AbstractFeature is abstract
> 2011-08-23 13:11:09,552 DEBUG [org.geotools.xml] - Property
> http://www.opengis.net/gml/3.2:domainSet not found but minoccurs> 0
>
> If I remove the “targetAttributeNode” of the mapping, I get this output:
>
> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" ...
> <wfs:member>
> <lcs:LandCoverSurfaceCoverage gml:id="land_cover_coverages.1">
> <gml:domainSet/>
> <cvgvp:domainExtent>
> <gmd:EX_Extent>
> <gmd:geographicElement>
> …
> …
>
> And in the log file I only get this line:
>
> 011-08-23 13:30:40,111 DEBUG [org.geotools.xml] - AbstractFeature is abstract
>
>
> I have a similar problem with the geometry attribute of each element of this
> coverage using the “the_geom” column of a shapefile, but I think this one is
> more simple.
>
> I hope I’ve explained it right and someone can help me. Thank you in advance.
>
> Rubén Velasco
>
>
> [http://www.gijon.eu/Imagenes/correo/pie_correo.jpg]
>
>
>
>
--
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
---
Antes de imprimir este correo piensa bien si es necesario hacerlo.
If you print this email please think if you really need to do it.
Enantes d'imprimir esti corréu, mira bien si ye necesario que lo faigas.
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users