Hi App-Schema experts,

I've yet another issue. I'm trying to map a PostGIS column
which contains a POLYGON geometry:

    polygon GEOMETRY NOT NULL

to a gml:Surface. The relevant part of the schema is:

    <element name="mySurface" type="gml:SurfacePropertyType"/>

I'm expecting the following output:

    <myns:MyFeature gml:id="...">
      <myns:mySurface>
        <gml:Surface gml:id="..." 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
          <gml:patches>
            <gml:PolygonPatch>
              <gml:exterior>
                <gml:LinearRing>
                  <gml:posList>11.5 23.4 12.2 13.43 ...</gml:posList>
                </gml:LinearRing>
              </gml:exterior>
            </gml:PolygonPatch>
          </gml:patches>
        </gml:Surface>
      </myns:mySurface>
    </myns:MyFeature>

This is my mapping:

    <AttributeMapping>
      <targetAttribute>myns:mySurface</targetAttribute>
      <sourceExpression>
        <OCQL>polygon</OCQL>
      </sourceExpression>
    </AttributeMapping>

However, I get an error message stating that GeoServer can't perform the
following conversion:

    gml:Polygon -> gml:Surface

So I tried to work around this limitation by using an own surface type
like this:

    <complexType name="MySurfaceType">
      <sequence>
        <element ref="gml:patches"/>
      </sequence>
    </complexType>

Then I used the following mapping:

    <AttributeMapping>
      
<targetAttribute>myns:mySurface/myns:MySurface/gml:patches</targetAttribute>
      
<targetAttributeNode>gml:SurfacePatchArrayPropertyType</targetAttributeNode>
      <sourceExpression>
        <OCQL>polygon</OCQL>
      </sourceExpression>
    </AttributeMapping>

But I got another error message that GeoServer also can't perform this
conversion:

    gml:Polygon -> gml:PolygonPatch

This sounds very strange, because both conversions are almost trivial:

    gml:Polygon -> gml:PolygonPatch
    gml:Polygon -> gml:Surface

Is there a way to perform that conversion in GeoServer, or do I have to
wait until PostGIS has native support for the POLYHEDRALSURFACE type?

Also, would GeoServer then be able to perform that conversion automatically,
or is there no way but to store the geometry as a POLYHEDRALSURFACE in the
first place?


Greets,
Volker

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to