[Geoserver-devel] [jira] Created: (GEOS-3756) WFS Inserting a Point (map EPSG:900913 and Layer EPSG:4326) org.geotools.referencing.operation.projection.PointOutsideEnvelopeException: 727833.38323013 outside of (-180.0, 180.0)

WFS Inserting a Point (map EPSG:900913 and Layer EPSG:4326) org.geotools.referencing.operation.projection.PointOutsideEnvelopeException: 727833.38323013 outside of (-180.0,180.0)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: GEOS-3756
                 URL: http://jira.codehaus.org/browse/GEOS-3756
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 2.0.0
         Environment: - Tomcat v6.0.x
- Openlayers
- Windows & linux
- Postgis 8.3
            Reporter: Eduard Witteveen
            Assignee: Andrea Aime

- I have a postgis table with points stored in the projection: EPSG:4326
- I use openlayers in the browser, which uses google-maps, so i use there the projection: EPSG:900913

- Moving an existing point around by usage of WFS works, same as delete
- Inserting an new point fails, it appears that the provided x,y position is validated by the layer projection extent, without doing a point transformation first.
(error message: org.geotools.referencing.operation.projection.PointOutsideEnvelopeException: 727833.38323013 outside of (-180.0,180.0) )

Below are first a working move action, followed by a not working insert action (REQUEST / RESPONSE / GEOSERVER CONSOLE OUTPUT)

Moving a point request:
<?xml version="1.0"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;
  <wfs:Update xmlns:feature="http://horus.nu/&quot; typeName="feature:editor">
    <wfs:Property>
      <wfs:Name>editorpoint</wfs:Name>
      <wfs:Value>
        <gml:Point xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913">
          <gml:pos>730681.1855585455 7013777.822641843</gml:pos>
        </gml:Point>
      </wfs:Value>
    </wfs:Property>
    <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
      <ogc:FeatureId fid="editor.59"/>
    </ogc:Filter>
  </wfs:Update>
</wfs:Transaction>

Moving a point response:
<?xml version="1.0"?>
<wfs:TransactionResponse xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:horus="http://horus.nu/&quot; xmlns:xlink="http://www.w3.org/1999/xlink&quot; xmlns:ows="http://www.opengis.net/ows&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd&quot;&gt;
  <wfs:TransactionSummary>
    <wfs:totalInserted>0</wfs:totalInserted>
    <wfs:totalUpdated>1</wfs:totalUpdated>
    <wfs:totalDeleted>0</wfs:totalDeleted>
  </wfs:TransactionSummary>
  <wfs:TransactionResults/>
  <wfs:InsertResults>
    <wfs:Feature>
      <ogc:FeatureId fid="none"/>
    </wfs:Feature>
  </wfs:InsertResults>
</wfs:TransactionResponse>

Console output:
06 jan 15:51:06 DEBUG [geoserver.filters] - filtering http://localhost:8080/geoserver/wfs
06 jan 15:51:06 DEBUG [geoserver.requests] - First 4 bytes of XML doc are : 3C ('<') 77 ('w') 66 ('f') 73 ('s')
06 jan 15:51:06 DEBUG [geoserver.requests] - Charset detection phase 1. Inferred encoding: UTF-8
06 jan 15:51:06 DEBUG [geoserver.requests] - Invalid(?) XML declaration: <wfs:T.
06 jan 15:51:06 DEBUG [geoserver.requests] - Charset detection phase 2. Charset in XML declaration is `null`.
06 jan 15:51:06 DEBUG [geoserver.requests] - Trying to create reader basing on existing charset information: `UTF-8`.
06 jan 15:51:06 DEBUG [geoserver.ows] - Raw XML request starts with: <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;&lt;wfs:Update typeName="feature:editor" xmlns:feature="http://horus.nu/&quot;&gt;&lt;wfs:Property&gt;&lt;wfs:Name&gt;editorpoint&lt;/wfs:Name&gt;&lt;wfs:Value&gt;&lt;gml:Point xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913"><gml:pos>715852.4020738776 7013319.200472212</gml:pos></gml:Point></wfs:Value></wfs:Property><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;&lt;ogc:FeatureId fid="editor.59"/></ogc:Filter></wfs:Update></wfs:Transaction>

Inserting a point request:
<?xml version="1.0"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;
  <wfs:Insert>
    <feature:editor xmlns:feature="http://horus.nu/&quot;&gt;
      <feature:editorpoint>
        <gml:Point xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913">
          <gml:pos>727833.38323013 7011262.8555101</gml:pos>
        </gml:Point>
      </feature:editorpoint>
    </feature:editor>
  </wfs:Insert>
</wfs:Transaction>

Inserting a point response:
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:ows="http://www.opengis.net/ows&quot; version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;
  <ows:Exception exceptionCode="InvalidParameterValue">
    <ows:ExceptionText>Error performing insert</ows:ExceptionText>
    <ows:ExceptionText>Details:</ows:ExceptionText>
    <ows:ExceptionText>org.geoserver.wfs.WFSException: Error performing insert
  at org.geoserver.wfs.response.TransactionResponse.v_1_1(TransactionResponse.java:197)
  at org.geoserver.wfs.response.TransactionResponse.write(TransactionResponse.java:67)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:705)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:213)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
  at java.lang.Thread.run(Unknown Source)
</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Console output:
06 jan 15:53:41 DEBUG [geoserver.filters] - filtering http://localhost:8080/geoserver/wfs
06 jan 15:53:41 DEBUG [geoserver.requests] - First 4 bytes of XML doc are : 3C ('<') 77 ('w') 66 ('f') 73 ('s')
06 jan 15:53:41 DEBUG [geoserver.requests] - Charset detection phase 1. Inferred encoding: UTF-8
06 jan 15:53:41 DEBUG [geoserver.requests] - Invalid(?) XML declaration: <wfs:T.
06 jan 15:53:41 DEBUG [geoserver.requests] - Charset detection phase 2. Charset in XML declaration is `null`.
06 jan 15:53:41 DEBUG [geoserver.requests] - Trying to create reader basing on existing charset information: `UTF-8`.
06 jan 15:53:41 DEBUG [geoserver.ows] - Raw XML request starts with: <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;&lt;wfs:Insert&gt;&lt;feature:editor xmlns:feature="http://horus.nu/&quot;&gt;&lt;feature:editorpoint&gt;&lt;gml:Point xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913"><gml:pos>727833.38323013 7011262.8555101</gml:pos></gml:Point></feature:editorpoint></feature:editor></wfs:Insert></wfs:Transaction>

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira