Re: [Geotools-devel] imagemosaic-jdbc pgraster blobAttributeName (and fix)
On Sat, Jul 16, 2016 at 09:44:56AM +0200, Christian Mueller wrote: > Hi Frank > > I have read this mail after reading the mail about the class cast > exception. Please prepare a "bugfix" pull request containing all the bugs > you have found. I've created PR#1240 with the two of them. Frank > Thanks > Christian -- Frank Gevaerts frank.gevae...@fks.be fks bvba - Formal and Knowledge Systemshttp://www.fks.be/ Schampbergstraat 32Tel: ++32-(0)11-21 49 11 B-3511 KURINGEN-HASSELTFax: ++32-(0)11-22 04 19 -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev ___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] imagemosaic-jdbc pgraster blobAttributeName (and fix)
Hi Frank I have read this mail after reading the mail about the class cast exception. Please prepare a "bugfix" pull request containing all the bugs you have found. Thanks Christian On Fri, Jul 15, 2016 at 11:06 PM, Jody Garnettwrote: > Pull request is probably easier, since we can track comments line by line. > Goes without saying that any fix needs test case and docs (for a > functionality change). > > Have you checked who the module maintainer is for imagemosaic-jdbc? > > -- > Jody Garnett > > On 14 July 2016 at 08:33, Frank Gevaerts wrote: > >> Hi, >> >> One place (getNoDataValue()) in the pgraster driver in imagemosaic-jdbc >> assumes >> that the raster column in the database is named 'rast', so setting >> blobAttributeName >> to something different doesn't work. >> >> I'm attaching a proposed fix. I can submit a PR if needed, but I'll wait >> for >> comments first. >> >> Frank >> >> >> -- >> Frank Gevaerts frank.gevae...@fks.be >> fks bvba - Formal and Knowledge Systemshttp://www.fks.be/ >> Schampbergstraat 32Tel: ++32-(0)11-21 49 11 >> B-3511 KURINGEN-HASSELTFax: ++32-(0)11-22 04 19 >> >> >> -- >> What NetFlow Analyzer can do for you? Monitors network bandwidth and >> traffic >> patterns at an interface-level. Reveals which users, apps, and protocols >> are >> consuming the most bandwidth. Provides multi-vendor support for NetFlow, >> J-Flow, sFlow and other flows. Make informed decisions using capacity >> planning >> reports.http://sdm.link/zohodev2dev >> ___ >> GeoTools-Devel mailing list >> GeoTools-Devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> >> > > > -- > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > ___ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > > -- DI Christian Mueller MSc (GIS), MSc (IT-Security) OSS Open Source Solutions GmbH -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] imagemosaic-jdbc pgraster blobAttributeName (and fix)
Pull request is probably easier, since we can track comments line by line. Goes without saying that any fix needs test case and docs (for a functionality change). Have you checked who the module maintainer is for imagemosaic-jdbc? -- Jody Garnett On 14 July 2016 at 08:33, Frank Gevaertswrote: > Hi, > > One place (getNoDataValue()) in the pgraster driver in imagemosaic-jdbc > assumes > that the raster column in the database is named 'rast', so setting > blobAttributeName > to something different doesn't work. > > I'm attaching a proposed fix. I can submit a PR if needed, but I'll wait > for > comments first. > > Frank > > > -- > Frank Gevaerts frank.gevae...@fks.be > fks bvba - Formal and Knowledge Systemshttp://www.fks.be/ > Schampbergstraat 32Tel: ++32-(0)11-21 49 11 > B-3511 KURINGEN-HASSELTFax: ++32-(0)11-22 04 19 > > > -- > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > ___ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > > -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] imagemosaic-jdbc pgraster blobAttributeName (and fix)
Hi, One place (getNoDataValue()) in the pgraster driver in imagemosaic-jdbc assumes that the raster column in the database is named 'rast', so setting blobAttributeName to something different doesn't work. I'm attaching a proposed fix. I can submit a PR if needed, but I'll wait for comments first. Frank -- Frank Gevaerts frank.gevae...@fks.be fks bvba - Formal and Knowledge Systemshttp://www.fks.be/ Schampbergstraat 32Tel: ++32-(0)11-21 49 11 B-3511 KURINGEN-HASSELTFax: ++32-(0)11-22 04 19 >From 3aefe638e857f60593a5e072f1dec297d3a711ab Mon Sep 17 00:00:00 2001 From: Frank GevaertsDate: Thu, 30 Jun 2016 11:22:43 +0200 Subject: [PATCH 1/5] Use blobAttributeName correctly in JDBCAccessPGRaster. --- .../geotools/gce/imagemosaic/jdbc/custom/JDBCAccessPGRaster.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/custom/JDBCAccessPGRaster.java b/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/custom/JDBCAccessPGRaster.java index e42e5cb..7d3597d 100644 --- a/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/custom/JDBCAccessPGRaster.java +++ b/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/custom/JDBCAccessPGRaster.java @@ -334,7 +334,7 @@ public class JDBCAccessPGRaster extends JDBCAccessCustom { Please note: alternatively this value could be loaded from mosaic config file, we could add an optional element/attribute to specify this value. */ -Number noDataValue = getNoDataValue(imageLevelInfo.getTileTableName(), con); +Number noDataValue = getNoDataValue(imageLevelInfo.getTileTableName(), getConfig().getBlobAttributeNameInTileTable(), con); imageLevelInfo.setNoDataValue(noDataValue); getLevelInfos().add(imageLevelInfo); @@ -365,12 +365,12 @@ public class JDBCAccessPGRaster extends JDBCAccessCustom { /* extract noDataValues for each overview from overview raster tables */ -private Number getNoDataValue(String coverageTableName, Connection con) throws SQLException { +private Number getNoDataValue(String coverageTableName, String blobAttributeName, Connection con) throws SQLException { PreparedStatement s = null; ResultSet res = null; try { -String stmt = "select ST_BandNoDataValue(rast) from " + coverageTableName + " limit 1"; +String stmt = "select ST_BandNoDataValue(" + blobAttributeName + ") from " + coverageTableName + " limit 1"; s = con.prepareStatement(stmt); res = s.executeQuery(); -- 2.8.1 -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel