From: Brett W. <bre...@ge...> - 2013-01-21 11:47:17
|
Hi Mikel, I'm not familiar with Raster Data nor with this plugin, but from looking at the source code it seems likely that there is a bug in the source code. Could other devs please look at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.decimationOnReadingControl and confirm or deny that there is no possibility of a rounding error, underflow or double to int conversion that results in a negative number! Mikel, it is my feeling that this is the source of the IllegalArgumentException being thrown. Brett ________________________________________ From: Mikel Gonzalez [mgo...@ce...] Sent: Monday, 21 January 2013 10:11 PM To: Brett Walker Cc: geo...@li... Subject: Re: GeoServer + PostGIS + Raster... Hi Brett, Thanks for your fast response. I already had the JDBC plugin inside geoserver's WEB-INF/lib/ folder, still I decided to update all geotools inside geoserver to 8.5 (version there was 8.2). I'm still getting the same error: java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: sourceXSubsampling <= 0! Full stack trace here: 2013-01-21 11:56:45,640 INFO [geoserver.web] - Getting list of coverages for saved store file:coverages/geosergis.xml java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: sourceXSubsampling <= 0! at org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:123) at org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:56) at org.geoserver.web.wicket.GeoServerDataProvider.fullSize(GeoServerDataProvider.java:226) at org.geoserver.web.wicket.GeoServerTablePanel$PagerDelegate.updateMatched(GeoServerTablePanel.java:551) at org.geoserver.web.wicket.GeoServerTablePanel$PagerDelegate.<init>(GeoServerTablePanel.java:544) at org.geoserver.web.wicket.GeoServerTablePanel.<init>(GeoServerTablePanel.java:219) at org.geoserver.web.wicket.GeoServerTablePanel.<init>(GeoServerTablePanel.java:92) at org.geoserver.web.data.layer.NewLayerPage$1.<init>(NewLayerPage.java:100) at org.geoserver.web.data.layer.NewLayerPage.<init>(NewLayerPage.java:100) at org.geoserver.web.data.store.CoverageStoreNewPage.onSave(CoverageStoreNewPage.java:71) at org.geoserver.web.data.store.AbstractCoverageStorePage$1.onSubmit(AbstractCoverageStorePage.java:115) at org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:68) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:143) 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.doPost(WicketServlet.java:160) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159) 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:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 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:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173) at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:97) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalArgumentException: sourceXSubsampling <= 0! at javax.imageio.IIOParam.setSourceSubsampling(IIOParam.java:287) at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.decimationOnReadingControl(AbstractGridCoverage2DReader.java:654) at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.setReadParams(AbstractGridCoverage2DReader.java:417) at org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCReader.loadTiles(ImageMosaicJDBCReader.java:438) at org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCReader.read(ImageMosaicJDBCReader.java:317) at org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:915) at org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:824) at org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:90) ... 101 more On al., 2013.eko urtren 21a 11:48, Brett Walker wrote: Hi Mikel You can find the latest stable jar for the Image Mosaicing Pyramidal JDBC Plugin here http://download.osgeo.org/webdav/geotools/org/geotools/gt-imagemosaic-jdbc/8.5/ Brett ________________________________________ From: Mikel Gonzalez Gainza [mgo...@ce...<mailto:mgo...@ce...>] Sent: Monday, 21 January 2013 9:39 PM To: geo...@li...<mailto:geo...@li...>; geo...@li...<mailto:geo...@li...> Subject: [Geotools-gt2-users] GeoServer + PostGIS + Raster... Hi everyone! I've been having some problems trying to publish some rasters through GeoServer. Yes, I know about ImageMosaic-JDBC but that still doesn't do the trick. Thing is, the data I'm storing as a raster I have to store it "manually" since it's given to me in text format. So far I've had no problem storing this information in PostGIS as raster. I've even tried OpenJUMP out to see if data was stored as it should be, and so it is. The problem comes when publishing it via Geoserver. I added the ImageMosaic-JDBC plugin to geoserver and I also found this: http://docs.geotools.org/latest/userguide/library/coverage/pgraster.html But I can't find the corresponding jar file in the geotools download. I'm not sure if it's just included in the ImageMosaic-JDBC but I tried configuring it for "pgraster" and I get a "java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: sourceXSubsampling <= 0!" error. I have configured my postgis database to match the configuration. Here is my config xml file: <config version="1.0"> <coverageName name="oek"/> <coordsys name="EPSG:4326"/> <!-- interpolation 1 = nearest neighbour, 2 = bilinear, 3 = bicubic --> <scaleop interpolation="1"/> <!-- <verify cardinality="false"/> --> <!-- possible values: universal,postgis,db2,mysql,oracle --> <spatialExtension name="pgraster"/> <mapping> <masterTable name="mosaic" > <coverageNameAttribute name="name"/> <maxXAttribute name="maxx"/> <maxYAttribute name="maxy"/> <minXAttribute name="minx"/> <minYAttribute name="miny"/> <resXAttribute name="resx"/> <resYAttribute name="resy"/> <tileTableNameAtribute name="tiletable" /> </masterTable> <tileTable> <blobAttributeName name="rast" /> </tileTable> </mapping> <connect> <!-- value DBCP or JNDI --> <dstype value="DBCP"/> <!-- <jndiReferenceName value=""/> --> <username value="postgis" /> <password value="ih8java00" /> <jdbcUrl value="jdbc:postgresql://localhost:5432/geosDB" /> <driverClassName value="org.postgresql.Driver"/> <maxActive value="10"/> <maxIdle value="0"/> </connect> </config> So, Am I missing the jar? If so, where can I download it? (i've looked over and over in the geotools download zip, but it's nowhere to be seen) -- Mikel Gonzalez Gainza, Software garatzaile bekaduna CENER-en // Becario desarrollador de software en CENER www.cener.com<http://www.cener.com> ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ GeoTools-GT2-Users mailing list Geo...@li...<mailto:Geo...@li...> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users . -- -- Mikel Gonzalez Gainza, Informatikari bekaduna CENER-en // Becario inform?tico en CENER www.cener.com<http://www.cener.com> |