[Geoserver-users] wfs:transaction in an OracleDatastore

Hi,

I tried to insert an polygon into an Oracle Datastore with the following wfs:insert :

<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns&quot; xmlns:citef="http://www.opengis.net/cite/functions&quot; xmlns:gml="http://opengis.net/gml&quot; xmlns:kvla="http://kataster.sv.rostock.de/geoserver&quot; xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance&quot; xmlns:topp="http://www.someserver.com/topp&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd&quot;&gt;
<wfs:Insert>
<kvla:MP_TEST>
<AKTENZEICHEN>abc</AKTENZEICHEN>
<GEOLOC><gml:MultiPolygon srsName="EPSG:2398"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4505580,5994620 4505830,5993590 4506730,5994500 4506190,5995160 4505580,5994620</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>
</GEOLOC>
</kvla:MP_TEST></wfs:Insert></wfs:Transaction>

but it runs into this error :
. . . Could not find attributeType named GEOLOC/MultiPolygonin featureType . . .
(for complete error message see attachment)
I'm confused, if there is an connection with the non-existing definition for the featuretype GEOLOC (see GS_ORA pic)

GeoServer-1.5.2
Oracle 9.2
Mapbender-2.4.2

greetings

Ronald

--
Ronald Woita
http://geoportal.rostock.de
Hansestadt Rostock
Kataster-, Vermessungs- und Liegenschaftsamt
Holbeinplatz 14, 18069 Rostock
email: ronald.woita@anonymised.com
phone: +49 (0)381 - 381 6256

errorGS152 (5.73 KB)

GS_ORA.png

Ronald Woita ha scritto:

Hi,

I tried to insert an polygon into an Oracle Datastore with the following wfs:insert :

<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns&quot; xmlns:citef="http://www.opengis.net/cite/functions&quot; xmlns:gml="http://opengis.net/gml&quot; xmlns:kvla="http://kataster.sv.rostock.de/geoserver&quot; xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance&quot; xmlns:topp="http://www.someserver.com/topp&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd&quot;&gt;
<wfs:Insert>
<kvla:MP_TEST>
<AKTENZEICHEN>abc</AKTENZEICHEN>
<GEOLOC><gml:MultiPolygon srsName="EPSG:2398"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4505580,5994620 4505830,5993590 4506730,5994500 4506190,5995160 4505580,5994620</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>
</GEOLOC>
</kvla:MP_TEST></wfs:Insert></wfs:Transaction>

Hmmm... the two attributes there are missing the namespace declaration, have you tried adding it? (using kvla:GEOLOC).

Anyways, I fear the real issue here is that in your feature type
the geometry type is missing, and thus the xml schema of your
feature type states "geometry" and not "multi-polygon".
They are in the same substitution group so the parser should accept
it anyways, I don't know... Justin is definitely more knowleadgeable
than me about these issues, he should be online in a few hours.

Oh, if you want to try out, the way to specify the geometry type
of a column in Oracle is to pass a special parameter to the index
creation. For example, if you want to say a certain column will hold
only points, you use:

CREATE INDEX ORA_TEST_POINTS_SHAPE_IDX ON ORA_TEST_POINTS (SHAPE)
INDEXTYPE IS MDSYS.SPATIAL_INDEX
PARAMETERS ('SDO_INDX_DIMS=2 LAYER_GTYPE="POINT"')

More information here:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_index_query.htm#i1000846

If you do specify the actual geometry type in the index GeoServer
will recognize it and will use the actual geometry type in the
feature type description.

Cheers
Andrea