使用OSM数据地理服务器

时间:2011-11-26 03:32:16

标签: openstreetmap geoserver mapnik osgeo

我想将OSM数据用于地理服务器,我已经下载了部分行星文件,即Indonesia.osm.bz2。

现在我想使用文件Indonesia.osm来geoserver。我有来自

的以下指示
[http://strangeoptics.blogspot.com/2011/10/using-osm-data-in-geoserver-part3.html][1]

我必须创建工作区并存储到geoserver。然后我创建图层,当我发布它时,我收到这样的错误消息

5 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.kmz' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.openlayers' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.text/html' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.atom' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.application/atom xml' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.application/xml' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.image/svg' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 16:43:28 WARN [geoserver.web] - Unable to find property: 'format.wms.image/svg xml' for component:  [class=org.geoserver.web.demo.MapPreviewPage]
25 Nov 17:01:11 WARN [geotools.jdbc] - No primary key or unique index found for planet_osm_line.
25 Nov 17:01:11 ERROR [wicket.RequestCycle] - Error occurred while building the resources for the configuration page
java.lang.RuntimeException: Error occurred while building the resources for the configuration page
    at org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:299)
    at org.geoserver.web.data.layer.NewLayerPage$6.onClick(NewLayerPage.java:245)
    at org.geoserver.web.wicket.SimpleAjaxLink$1.onClick(SimpleAjaxLink.java:44)
    at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:68)
    at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
    at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
    at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:119)
    at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
    at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
    at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
    at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)
    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.doGet(FrameworkServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    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.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
    at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    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:71)
    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.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
    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:127)
    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:291)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Error occurred building feature type
    at org.geotools.jdbc.JDBCFeatureSource.buildFeatureType(JDBCFeatureSource.java:342)
    at org.geotools.jdbc.JDBCDataStore.createFeatureSource(JDBCDataStore.java:768)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:385)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:350)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:644)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:103)
    at org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:323)
    at org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:292)
    ... 90 more
Caused by: org.postgresql.util.PSQLException: ERROR: permission denied for relation geometry_columns
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
    at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    at org.geotools.data.postgis.PostGISDialect.lookupGeometryType(PostGISDialect.java:326)
    at org.geotools.data.postgis.PostGISDialect.getMapping(PostGISDialect.java:284)
    at org.geotools.jdbc.JDBCFeatureSource.getColumnMetadata(JDBCFeatureSource.java:651)
    at org.geotools.jdbc.JDBCFeatureSource.buildFeatureType(JDBCFeatureSource.java:198)
    ... 97 more

什么是wrh

1 个答案:

答案 0 :(得分:2)

用于从GeoServer连接到PostGIS的数据库用户无权查询geometry_columns表。也许您可以尝试使用与加载OSM数据相同的用户,或使用Postgres的GRANT命令向GeoServer的用户授予其他权限。