Hi all,

Has anyone been able to get app-schema to encode a geometry like the following 
(specifically gml:CircleByCenterPoint within a gml:segments element)?
...
    <om:featureOfInterest>
      <gml:DynamicFeature gml:id="uuid.48bb4631-1470-40a3-bac2-8114bc93ed32">
        <gml:location>
          <gml:Curve axisLabels="latitude longitude" 
gml:id="uuid.bbc18c15-4829-4186-a0d8-888933cf1f39" srsDimension="2"
                     srsName="urn:ogc:def:crs:EPSG::4326" uomLabels="deg deg">
            <gml:segments>
              <gml:CircleByCenterPoint numArc="1">
                <gml:pos>46.315 -94.675</gml:pos>
                <gml:radius uom="[nm_i]">7.5</gml:radius>
              </gml:CircleByCenterPoint>
            </gml:segments>
          </gml:Curve>
        </gml:location>
      </gml:DynamicFeature>
    </om:featureOfInterest>
...

I did verify that this sample XML is valid according to the schema.

If I encode the geometry like this:
<AttributeMapping>
<targetAttribute>uswx:CenterWeatherAdvisory/uswx:centerWeatherAdvisoryRecord/om:featureOfInterest/gml:DynamicFeature/gml:location/gml:Curve
                </targetAttribute>
                <ClientProperty>
                                <name>uomLabels</name>
                                <value>'deg deg'</value>
                </ClientProperty>
                <ClientProperty>
                                <name>axisLabels</name>
                                <value>'latitude longitude'</value>
                </ClientProperty>
                <ClientProperty>
                                <name>srsDimension</name>
                                <value>'2'</value>
                </ClientProperty>
                <ClientProperty>
                                <name>srsName</name>
                                
<value>'http://www.opengis.net/def/crs/EPSG/0/4326'</value>
                </ClientProperty>
                <idExpression>
                                <OCQL>strConcat('location.',id)</OCQL>
                </idExpression>
                <sourceExpression>
                                <OCQL>location</OCQL>
                </sourceExpression>
</AttributeMapping>

GeoServer returns gml:Curve/gml:segments/gml:LineStringSegment, instead of a 
gml:CircleByCenterPoint, with the gml:postList containing the single point 
repeated (even though I am just storing a point in the database to a column of 
type GEOMETRY):
...
<gml:Curve axisLabels="latitude longitude" gml:id="cwaLocation.2" 
srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"; 
uomLabels="deg deg">
<gml:segments>
<gml:LineStringSegment interpolation="linear">
<gml:posList>46.315 -94.675 46.315 -94.675</gml:posList>
</gml:LineStringSegment>
</gml:segments>
</gml:Curve>
...

Even if I encode down to the gml:CircleByCenterPoint, GeoServer throws this 
error:
java.lang.RuntimeException: Error applying mapping with targetAttribute 
uswx:centerWeatherAdvisoryRecord/om:featureOfInterest/gml:DynamicFeature/gml:location/gml:Curve/gml:segments/gml:CircleByCenterPoint
Error applying mapping with targetAttribute 
uswx:centerWeatherAdvisoryRecord/om:featureOfInterest/gml:DynamicFeature/gml:location/gml:Curve/gml:segments/gml:CircleByCenterPoint
org.geotools.feature.type.GeometryTypeImpl cannot be cast to 
org.opengis.feature.type.ComplexType

Any help would be greatly appreciated.

Thanks,
Amanda

Amanda Schabowsky
SW Engineer
HARRIS CORPORATION
[Harris_wR_2color_72dpi.jpg]<http://www.harris.com/>

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

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

Reply via email to