[Geoserver-users] WFS-T / Oracle question

GeoServer 1.6.2 on WinXP, Oracle plugin.

In the wfs:FeatureCollection, I get xml like this:

<gml:featureMember>
    <gml:STATES fid="STATES.17">
      <gml:STATE_NAME>Louisiana</gml:STATE_NAME>
      <gml:STATE>LA</gml:STATE>
      <gml:REGION>Southeast</gml:REGION>
      <gml:GEOLOC>
        <gml:MultiPolygon
srsName="http://www.opengis.net/gml/srs/epsg.xml#4269&quot;&gt;
          <gml:polygonMember>
            <gml:Polygon>
              <gml:outerBoundaryIs>
                <gml:LinearRing>
                  <gml:coordinates
xmlns:gml="http://www.opengis.net/gml&quot; decimal="." cs="," ts=" ">

In my TransactionRequest I have this:
<wfs:Insert xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
        <gml:STATES xmlns="http://www.opengis.net/wfs&quot;&gt;
            <gml:GEOLOC>
                <gml:MultiPolygon
srsName="http://www.opengis.net/gml/srs/epsg.xml#4269&quot;&gt;
                    <gml:polygonMember>
                        <gml:Polygon>
                            <gml:outerBoundaryIs>
                                <gml:LinearRing>

<gml:coordinates>-65.647717,42.759745 -65.647717,44.218079
-68.029565,44.218079 -68.029565,42.759745
-65.647717,42.759745</gml:coordinates>
                                </gml:LinearRing>
                            </gml:outerBoundaryIs>
                        </gml:Polygon>
                    </gml:polygonMember>
                </gml:MultiPolygon>
            </gml:GEOLOC>
            <STATE_NAME xmlns="">ZULU</STATE_NAME>
            <STATE xmlns="">ZZ</STATE>
            <REGION xmlns=""></REGION>
            <MI_STYLE xmlns=""></MI_STYLE>
        </gml:STATES>
    </wfs:Insert>

After sending the request, I get a ServiceException:

<ServiceException>
      org.geotools.data.DataSourceException: SQL Exception writing
geometry columnORA-29875: failed in the execution of the
ODCIINDEXINSERT routine
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at &quot;MDSYS.SDO_INDEX_METHOD_10I&quot;, line 709
ORA-06512: at &quot;MDSYS.SDO_INDEX_METHOD_10I&quot;, line 225

Any idea what's wrong with my request? Or is it something on the server?
TIA.

Hmmm... it appears that the feature is not being reprojected back into the srs of the dataset (4326). Perhaps this is a bug with oracle. Andrea?

CB wrote:

GeoServer 1.6.2 on WinXP, Oracle plugin.

In the wfs:FeatureCollection, I get xml like this:

<gml:featureMember>
    <gml:STATES fid="STATES.17">
      <gml:STATE_NAME>Louisiana</gml:STATE_NAME>
      <gml:STATE>LA</gml:STATE>
      <gml:REGION>Southeast</gml:REGION>
      <gml:GEOLOC>
        <gml:MultiPolygon
srsName="http://www.opengis.net/gml/srs/epsg.xml#4269&quot;&gt;
          <gml:polygonMember>
            <gml:Polygon>
              <gml:outerBoundaryIs>
                <gml:LinearRing>
                  <gml:coordinates
xmlns:gml="http://www.opengis.net/gml&quot; decimal="." cs="," ts=" ">

In my TransactionRequest I have this:
<wfs:Insert xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
        <gml:STATES xmlns="http://www.opengis.net/wfs&quot;&gt;
            <gml:GEOLOC>
                <gml:MultiPolygon
srsName="http://www.opengis.net/gml/srs/epsg.xml#4269&quot;&gt;
                    <gml:polygonMember>
                        <gml:Polygon>
                            <gml:outerBoundaryIs>
                                <gml:LinearRing>

<gml:coordinates>-65.647717,42.759745 -65.647717,44.218079
-68.029565,44.218079 -68.029565,42.759745
-65.647717,42.759745</gml:coordinates>
                                </gml:LinearRing>
                            </gml:outerBoundaryIs>
                        </gml:Polygon>
                    </gml:polygonMember>
                </gml:MultiPolygon>
            </gml:GEOLOC>
            <STATE_NAME xmlns="">ZULU</STATE_NAME>
            <STATE xmlns="">ZZ</STATE>
            <REGION xmlns=""></REGION>
            <MI_STYLE xmlns=""></MI_STYLE>
        </gml:STATES>
    </wfs:Insert>

After sending the request, I get a ServiceException:

<ServiceException>
      org.geotools.data.DataSourceException: SQL Exception writing
geometry columnORA-29875: failed in the execution of the
ODCIINDEXINSERT routine
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at &quot;MDSYS.SDO_INDEX_METHOD_10I&quot;, line 709
ORA-06512: at &quot;MDSYS.SDO_INDEX_METHOD_10I&quot;, line 225

Any idea what's wrong with my request? Or is it something on the server?
TIA.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,47fe472d124011961014482!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Justin Deoliveira ha scritto:

Hmmm... it appears that the feature is not being reprojected back into the srs of the dataset (4326). Perhaps this is a bug with oracle. Andrea?

Hum, how do you know the dataset is originally in 4326? I did not see
anything related?

CB, how have you configured your oracle tables? The minimum amount of
information you have to provide for GeoServer to work is the srs in
the metadata tables, and the geometry type in the index creation.

For example:
CREATE TABLE ORA_TEST_POINTS (
     NAME VARCHAR2(15),
     INTVAL NUMBER(12,0),
     ID NUMBER(3,0) PRIMARY KEY,
     SHAPE MDSYS.SDO_GEOMETRY
)

INSERT INTO user_sdo_geom_metadata
(TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES('ORA_TEST_POINTS','SHAPE',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',0,-20,0.5),MDSYS.SDO_DIM_ELEMENT('Y',0,10,0.5)),4326)

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"')

First creates the table, second states it's in 4326,
third creates a index specifying the geometry is not
generic, but a POINT.

With these informations it should work... thought as I said,
it's not maintained, none of the developers has used an Oracle
instance in months.

Anyways, there is one laying dormant on my PC. If you can send
me a sample of your data as a shapefile and the transaction
commands that are failing I can have a quick look and see
if there is an easy fix that can make it work.

Cheers
Andrea

Andrea Aime wrote:

Justin Deoliveira ha scritto:

Hmmm... it appears that the feature is not being reprojected back into the srs of the dataset (4326). Perhaps this is a bug with oracle. Andrea?

Hum, how do you know the dataset is originally in 4326? I did not see
anything related?

Just assumed, since it is the states layer... and the complaint about the difference in srs. But I coudl very well be wrong :).