creating geometryless tables using REST

View: New views
8 Messages — Rating Filter:   Alert me  

creating geometryless tables using REST

by Bart van den Eijnden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

I am trying to use the REST interface of GS 2.0 to create geometryless
tables for ArcSDE, but I am getting:

Unable to transform referenced envelope, crs has not yet been provided.

I have been able to create the namespace as well as the store, and I've
verified they are working ok by manually creating a featureType using the
admin tool.

The request I am trying is:

  function createFeatureType($datastore, $name, $nativeName) {
      $xml =
"<featureType><name>".$name."</name><nativeName>".$nativeName."</nativeName>";
      $xml .= "<projectionPolicy>FORCE_DECLARED</projectionPolicy>";
      $xml .= "<srs>EPSG:28992</srs>";
      $xml .=
"<latLonBoundingBox><minx>2.0</minx><maxx>6.0</maxx><miny>52.0</miny><maxy>56.0</maxy></latLonBoundingBox>";
      $xml .= "</featureType>";
      $this->doPOST("workspaces/".$this->mszWorkspace."/datastores/".$datastore."/featuretypes",
$xml);
  }

The stack trace I am getting is:

org.geoserver.rest.RestletException: java.lang.NullPointerException:
Unable to transform referenced envelope, crs has not yet been provided.
        at
org.geoserver.rest.ReflectiveResource.handleException(ReflectiveResource.java:329)
        at
org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118)
        at org.restlet.Finder.handle(Finder.java:296)
        at
org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:38)
        at org.restlet.Filter.doHandle(Filter.java:105)
        at org.restlet.Filter.handle(Filter.java:134)
        at org.restlet.Router.handle(Router.java:444)
        at
com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)
        at
org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:79)
        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:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
        at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.lang.NullPointerException: Unable to transform referenced
envelope, crs has not yet been provided.
        at
org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:618)
        at
org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:584)
        at
org.geoserver.catalog.CatalogBuilder.initFeatureType(CatalogBuilder.java:551)
        at
org.geoserver.catalog.rest.FeatureTypeResource.handleObjectPost(FeatureTypeResource.java:93)
        at
org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:115)
        ... 56 more

Are geometryless tables implemented for REST?

TIA.

Best regards,
Bart


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Bart van den Eijnden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It does work if I leave out the srs from my XML, but the strange thing is
that the admin tool says the SRS is required.

Best regards,
Bart

> Hi list,
>
> I am trying to use the REST interface of GS 2.0 to create geometryless
> tables for ArcSDE, but I am getting:
>
> Unable to transform referenced envelope, crs has not yet been provided.
>
> I have been able to create the namespace as well as the store, and I've
> verified they are working ok by manually creating a featureType using the
> admin tool.
>
> The request I am trying is:
>
>   function createFeatureType($datastore, $name, $nativeName) {
>       $xml =
> "<featureType><name>".$name."</name><nativeName>".$nativeName."</nativeName>";
>       $xml .= "<projectionPolicy>FORCE_DECLARED</projectionPolicy>";
>       $xml .= "<srs>EPSG:28992</srs>";
>       $xml .=
> "<latLonBoundingBox><minx>2.0</minx><maxx>6.0</maxx><miny>52.0</miny><maxy>56.0</maxy></latLonBoundingBox>";
>       $xml .= "</featureType>";
>       $this->doPOST("workspaces/".$this->mszWorkspace."/datastores/".$datastore."/featuretypes",
> $xml);
>   }
>
> The stack trace I am getting is:
>
> org.geoserver.rest.RestletException: java.lang.NullPointerException:
> Unable to transform referenced envelope, crs has not yet been provided.
>         at
> org.geoserver.rest.ReflectiveResource.handleException(ReflectiveResource.java:329)
>         at
> org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118)
>         at org.restlet.Finder.handle(Finder.java:296)
>         at
> org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:38)
>         at org.restlet.Filter.doHandle(Filter.java:105)
>         at org.restlet.Filter.handle(Filter.java:134)
>         at org.restlet.Router.handle(Router.java:444)
>         at
> com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)
>         at
> org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:79)
>         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:727)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>         at
> org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>         at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>         at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>         at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>         at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>         at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: java.lang.NullPointerException: Unable to transform referenced
> envelope, crs has not yet been provided.
>         at
> org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:618)
>         at
> org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:584)
>         at
> org.geoserver.catalog.CatalogBuilder.initFeatureType(CatalogBuilder.java:551)
>         at
> org.geoserver.catalog.rest.FeatureTypeResource.handleObjectPost(FeatureTypeResource.java:93)
>         at
> org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:115)
>         ... 56 more
>
> Are geometryless tables implemented for REST?
>
> TIA.
>
> Best regards,
> Bart
>



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Andrea Aime-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

bartvde@... ha scritto:
> It does work if I leave out the srs from my XML, but the strange thing is
> that the admin tool says the SRS is required.

As far as I know the capabilities document generation may break if
we don't have an envelope and a SRS.
For the geometryless case usually the UI forces the user to input
both, even if they are just fake.

I don't know the details of RESTConfig, but I guess there should be
  a way to specify both manually in the request no?

Cheers
Andrea


--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Bart van den Eijnden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andrea,

that's what I tried in my first request, to supply both the SRS and the
latlonBBox to the REST interface. I even made sure the SRS was supplied
before the latlonBBox, just in case.

Or maybe I got something wrong in the XML? I was just mimicking the XML
that is created using the admin tool, is that the way to go?

Best regards,
Bart

> bartvde@... ha scritto:
>> It does work if I leave out the srs from my XML, but the strange thing
>> is
>> that the admin tool says the SRS is required.
>
> As far as I know the capabilities document generation may break if
> we don't have an envelope and a SRS.
> For the geometryless case usually the UI forces the user to input
> both, even if they are just fake.
>
> I don't know the details of RESTConfig, but I guess there should be
>   a way to specify both manually in the request no?
>
> Cheers
> Andrea
>
>
> --
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
>



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Andrea Aime-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

bartvde@... ha scritto:
> Hi Andrea,
>
> that's what I tried in my first request, to supply both the SRS and the
> latlonBBox to the REST interface. I even made sure the SRS was supplied
> before the latlonBBox, just in case.

Hmmm... this sounds like a bug. Can you open a report on Jira?

> Or maybe I got something wrong in the XML? I was just mimicking the XML
> that is created using the admin tool, is that the way to go?

I think it is, yes

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Bart van den Eijnden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Done, see:

http://jira.codehaus.org/browse/GEOS-3635

Best regards,
Bart

> bartvde@... ha scritto:
>> Hi Andrea,
>>
>> that's what I tried in my first request, to supply both the SRS and the
>> latlonBBox to the REST interface. I even made sure the SRS was supplied
>> before the latlonBBox, just in case.
>
> Hmmm... this sounds like a bug. Can you open a report on Jira?
>
>> Or maybe I got something wrong in the XML? I was just mimicking the XML
>> that is created using the admin tool, is that the way to go?
>
> I think it is, yes
>
> Cheers
> Andrea
>
> --
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
>



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Justin Deoliveira-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can verify that it is possible to create geometryless feature types
with via REST with postgis, so it is possible.

Have you tried just using the name of the table in the request and
leaving out bounds information. Something like:

'<featureType><name>theFeatureType</name></featureType>'

Since the request is specifying the crs/srs the feature type gets
created with one and the restconfig assumes it can calculate a native
bounds for the layer. But since obviously it has no such bounds things fail.

So the above might work but as Andrea stated this breaks the WMS
capabilities document. This is actually something that did not occur to
me before. That said WFS should continue to function fine.

So two bugs at play:

1) RESTConfig shold check for the geometryless case and not assume a
bounding box is available even in cases where crs information is specified.

2) The WMS capabilities document should somehow handle this case of no
srs a bit more gracefully, perhaps ignoring geometryless feature types
all together. Or perhaps it should be up to RESTconfig to set up a
"dummy srs/bounds".

-Justin


bartvde@... wrote:

> Hi list,
>
> I am trying to use the REST interface of GS 2.0 to create geometryless
> tables for ArcSDE, but I am getting:
>
> Unable to transform referenced envelope, crs has not yet been provided.
>
> I have been able to create the namespace as well as the store, and I've
> verified they are working ok by manually creating a featureType using the
> admin tool.
>
> The request I am trying is:
>
>   function createFeatureType($datastore, $name, $nativeName) {
>       $xml =
> "<featureType><name>".$name."</name><nativeName>".$nativeName."</nativeName>";
>       $xml .= "<projectionPolicy>FORCE_DECLARED</projectionPolicy>";
>       $xml .= "<srs>EPSG:28992</srs>";
>       $xml .=
> "<latLonBoundingBox><minx>2.0</minx><maxx>6.0</maxx><miny>52.0</miny><maxy>56.0</maxy></latLonBoundingBox>";
>       $xml .= "</featureType>";
>       $this->doPOST("workspaces/".$this->mszWorkspace."/datastores/".$datastore."/featuretypes",
> $xml);
>   }
>
> The stack trace I am getting is:
>
> org.geoserver.rest.RestletException: java.lang.NullPointerException:
> Unable to transform referenced envelope, crs has not yet been provided.
>         at
> org.geoserver.rest.ReflectiveResource.handleException(ReflectiveResource.java:329)
>         at
> org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118)
>         at org.restlet.Finder.handle(Finder.java:296)
>         at
> org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:38)
>         at org.restlet.Filter.doHandle(Filter.java:105)
>         at org.restlet.Filter.handle(Filter.java:134)
>         at org.restlet.Router.handle(Router.java:444)
>         at
> com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)
>         at
> org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:79)
>         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:727)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>         at
> org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>         at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>         at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>         at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>         at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: java.lang.NullPointerException: Unable to transform referenced
> envelope, crs has not yet been provided.
>         at
> org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:618)
>         at
> org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:584)
>         at
> org.geoserver.catalog.CatalogBuilder.initFeatureType(CatalogBuilder.java:551)
>         at
> org.geoserver.catalog.rest.FeatureTypeResource.handleObjectPost(FeatureTypeResource.java:93)
>         at
> org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:115)
>         ... 56 more
>
> Are geometryless tables implemented for REST?
>
> TIA.
>
> Best regards,
> Bart
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@...
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: creating geometryless tables using REST

by Bart van den Eijnden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Justin,

thanks for your thorough analysis.

I can confirm that WMS already ignores the geometryless tables right now.
I get an empty layer list.

....
      <SRS>EPSG:42303</SRS>
      <LatLonBoundingBox minx="2.0" miny="52.0" maxx="6.0" maxy="56.0"/>
    </Layer>

The WFS caps look like this currently (I created them through REST using
latlonbbox but no SRS):

<FeatureType>
<Name>rwsagi:KERNGISNAT_ROMA_BODEMOVERIG</Name>
<Title/>
<Abstract/>
<DefaultSRS>urn:x-ogc:def:crs:null</DefaultSRS>

<ows:WGS84BoundingBox>
<ows:LowerCorner>2.0 52.0</ows:LowerCorner>
<ows:UpperCorner>6.0 56.0</ows:UpperCorner>
</ows:WGS84BoundingBox>
</FeatureType>

Best regards,
Bart

> I can verify that it is possible to create geometryless feature types
> with via REST with postgis, so it is possible.
>
> Have you tried just using the name of the table in the request and
> leaving out bounds information. Something like:
>
> '<featureType><name>theFeatureType</name></featureType>'
>
> Since the request is specifying the crs/srs the feature type gets
> created with one and the restconfig assumes it can calculate a native
> bounds for the layer. But since obviously it has no such bounds things
> fail.
>
> So the above might work but as Andrea stated this breaks the WMS
> capabilities document. This is actually something that did not occur to
> me before. That said WFS should continue to function fine.
>
> So two bugs at play:
>
> 1) RESTConfig shold check for the geometryless case and not assume a
> bounding box is available even in cases where crs information is
> specified.
>
> 2) The WMS capabilities document should somehow handle this case of no
> srs a bit more gracefully, perhaps ignoring geometryless feature types
> all together. Or perhaps it should be up to RESTconfig to set up a
> "dummy srs/bounds".
>
> -Justin
>
>
> bartvde@... wrote:
>> Hi list,
>>
>> I am trying to use the REST interface of GS 2.0 to create geometryless
>> tables for ArcSDE, but I am getting:
>>
>> Unable to transform referenced envelope, crs has not yet been provided.
>>
>> I have been able to create the namespace as well as the store, and I've
>> verified they are working ok by manually creating a featureType using
>> the
>> admin tool.
>>
>> The request I am trying is:
>>
>>   function createFeatureType($datastore, $name, $nativeName) {
>>       $xml =
>> "<featureType><name>".$name."</name><nativeName>".$nativeName."</nativeName>";
>>       $xml .= "<projectionPolicy>FORCE_DECLARED</projectionPolicy>";
>>       $xml .= "<srs>EPSG:28992</srs>";
>>       $xml .=
>> "<latLonBoundingBox><minx>2.0</minx><maxx>6.0</maxx><miny>52.0</miny><maxy>56.0</maxy></latLonBoundingBox>";
>>       $xml .= "</featureType>";
>>       $this->doPOST("workspaces/".$this->mszWorkspace."/datastores/".$datastore."/featuretypes",
>> $xml);
>>   }
>>
>> The stack trace I am getting is:
>>
>> org.geoserver.rest.RestletException: java.lang.NullPointerException:
>> Unable to transform referenced envelope, crs has not yet been provided.
>>         at
>> org.geoserver.rest.ReflectiveResource.handleException(ReflectiveResource.java:329)
>>         at
>> org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118)
>>         at org.restlet.Finder.handle(Finder.java:296)
>>         at
>> org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:38)
>>         at org.restlet.Filter.doHandle(Filter.java:105)
>>         at org.restlet.Filter.handle(Filter.java:134)
>>         at org.restlet.Router.handle(Router.java:444)
>>         at
>> com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)
>>         at
>> org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:79)
>>         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:727)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>         at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>>         at
>> org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>         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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>         at
>> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>         at
>> org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>         at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>>         at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>         at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>         at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>>         at
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>>         at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>>         at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>         at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>         at org.mortbay.jetty.Server.handle(Server.java:324)
>>         at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>>         at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>>         at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>         at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>>         at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>>         at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>> Caused by: java.lang.NullPointerException: Unable to transform
>> referenced
>> envelope, crs has not yet been provided.
>>         at
>> org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:618)
>>         at
>> org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:584)
>>         at
>> org.geoserver.catalog.CatalogBuilder.initFeatureType(CatalogBuilder.java:551)
>>         at
>> org.geoserver.catalog.rest.FeatureTypeResource.handleObjectPost(FeatureTypeResource.java:93)
>>         at
>> org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:115)
>>         ... 56 more
>>
>> Are geometryless tables implemented for REST?
>>
>> TIA.
>>
>> Best regards,
>> Bart
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@...
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users