[Geoserver-users] PostGIS SRID pb when insert feature through WFSv1.1 Geoserver

hi all,

Sorry for cross posting, i don't know if it is a geoserver (geotools) problem or a postGIS configuration one.

I have this exception when trying to insert feature in PostGIS through WFS V1.1 Geoserver 1.6

27 juin 15:01:05 ERROR [data.jdbc] - SQL Exception writing geometry columnERREUR: La nouvelle ligne pour la relation «ice_geom» viole la contrainte de vérification «enforce_srid_ice_polygon»
org.postgresql.util.PSQLException: ERREUR: La nouvelle ligne pour la relation «ice_geom» viole la contrainte de vérification «enforce_srid_ice_polygon»
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)

Exception is in french...

beginning of wfs request :
<wfs:Transaction service="WFS" version="1.1.0"
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:wims="http://www.flysafe-eu.org/wims&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
    http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd
    http://www.flysafe-eu.org/wims
    http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=wims:ice_geom&quot;&gt;
  <wfs:Insert>
     <wims:ice_geom>
<gml:boundedBy>
  <gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:6.11.2:4326">
    <gml:lowerCorner>10.0 30.0</gml:lowerCorner>
    <gml:upperCorner>50.0 80.0</gml:upperCorner>
  </gml:Envelope>
</gml:boundedBy>
...

thank you.

--
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr
05 61 07 84 93

hi all,

Sorry for cross posting, i don't know if it is a geoserver (geotools)
problem or a postGIS configuration one.

I have this exception when trying to insert feature in PostGIS through
WFS V1.1 Geoserver 1.6

27 juin 15:01:05 ERROR [data.jdbc] - SQL Exception writing geometry
columnERREUR: La nouvelle ligne pour la relation «ice_geom» viole la
contrainte de vérification «enforce_srid_ice_polygon»
org.postgresql.util.PSQLException: ERREUR: La nouvelle ligne pour la
relation «ice_geom» viole la contrainte de vérification
«enforce_srid_ice_polygon»
        at

Hi Sebastien

It seems there is a difference between the ice_polygon SRiD in postgis
and the one sent by the WFS query.
In geoserver, is ice_geom layer configured with the same SRID as
ice_geom table in postgis ?
WFS refers to EPSG:4326 for the ice_geom layer.

what's the output of the following query:

select srid(the_geom) from ice_geom;

Nicolas

Hi Sébastien,

We can better diagnose the problem with a bit more information. Can you
include the full xml of the "wfs:Insert" element and could you possibly
include the structure of the postgis table. ie. \d ice_geom.

Thanks,

-Justin

Sébastien Geindre wrote:

hi all,

Sorry for cross posting, i don't know if it is a geoserver (geotools)
problem or a postGIS configuration one.

I have this exception when trying to insert feature in PostGIS through
WFS V1.1 Geoserver 1.6

27 juin 15:01:05 ERROR [data.jdbc] - SQL Exception writing geometry
columnERREUR: La nouvelle ligne pour la relation «ice_geom» viole la
contrainte de vérification «enforce_srid_ice_polygon»
org.postgresql.util.PSQLException: ERREUR: La nouvelle ligne pour la
relation «ice_geom» viole la contrainte de vérification
«enforce_srid_ice_polygon»
        at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)

Exception is in french...

beginning of wfs request :
<wfs:Transaction service="WFS" version="1.1.0"
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:wims="http://www.flysafe-eu.org/wims&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
    http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd
    http://www.flysafe-eu.org/wims
    
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=wims:ice_geom&quot;&gt;
  <wfs:Insert>
     <wims:ice_geom>
<gml:boundedBy>
  <gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:6.11.2:4326">
    <gml:lowerCorner>10.0 30.0</gml:lowerCorner>
    <gml:upperCorner>50.0 80.0</gml:upperCorner>
  </gml:Envelope>
</gml:boundedBy>
...

thank you.

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org