[Geoserver-users] Connecting PostGIS (raster) to GeoSERVER

Hello-

New to geoserver, postgres and openlayers…

I’m building an opengeo web map tool using postgis, geoserver and openlayers. My postgis db contains both vector and raster data and I want to access the rasters from the db and publish as WCS to OpenLayers via geoserver.

I’ve followed the tutorial to given here: http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I’m using the examples exactly as written (except for username, passwd, dbname…) and it all works great up until I get to the “Importing the image data” section and type in the command below:

java -jar /usr/local/tomcat/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-11.0.jar import -config /usr/local/tomcat/webapps/geoserver/data/coverages/osm.postgis.xml -spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png

I am getting the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:649)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:367)
at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

I’ve checked and rechecked the jdbcURL in my connect.postgis.xml.inc file (it’s correct). I’ve checked and re-checked the username and password of the postgis database (both correct as well).

For a different application I wrote a simple java tool to query the database and it works using the same URL, username and password that are in the connect.postgis.xml.inc file.

Am I missing something in my ~/tomcat/webapps/geoserver directory structure?

Really appreciate any insight you can offer.

Thanks in advance.

Stephanie

Oh…config files are here…

1> connect.postgis.xml.inc

  1. mapping.postgis.xml.inc
  1. osm.postgis.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE ImageMosaicJDBCConfig [ ]> &mapping; &connect;

Hi Stephanie

No idea about the error, maybe I can start a debug session with your config files. On the other side, I would recommend to use the postgis raster extension

http://postgis.net/docs/RT_reference.html

The extension is available since POSTGIS 2.0. The tutorial is for POSTGIS with versions < 2.0 and uses BLOBs to store image data. Since version 2.0, there is a special data type RASTER with a lot of useful functions.

Importing raster data is described here

http://postgis.net/docs/using_raster_dataman.html#RT_Loading_Rasters

Configuring GeoServer for PostGis Raster is described here

http://docs.geoserver.org/stable/en/user/data/raster/postgisraster.html

Hope this helps

Cheers
Christian

···

On Mon, Dec 1, 2014 at 11:38 PM, Granger, Stephanie L (329M) <stephanie.l.granger@anonymised.com> wrote:

Hello-

New to geoserver, postgres and openlayers…

I’m building an opengeo web map tool using postgis, geoserver and openlayers. My postgis db contains both vector and raster data and I want to access the rasters from the db and publish as WCS to OpenLayers via geoserver.

I’ve followed the tutorial to given here: http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I’m using the examples exactly as written (except for username, passwd, dbname…) and it all works great up until I get to the “Importing the image data” section and type in the command below:

java -jar /usr/local/tomcat/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-11.0.jar import -config /usr/local/tomcat/webapps/geoserver/data/coverages/osm.postgis.xml -spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png

I am getting the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:649)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:367)
at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

I’ve checked and rechecked the jdbcURL in my connect.postgis.xml.inc file (it’s correct). I’ve checked and re-checked the username and password of the postgis database (both correct as well).

For a different application I wrote a simple java tool to query the database and it works using the same URL, username and password that are in the connect.postgis.xml.inc file.

Am I missing something in my ~/tomcat/webapps/geoserver directory structure?

Really appreciate any insight you can offer.

Thanks in advance.

Stephanie

Oh…config files are here…

1> connect.postgis.xml.inc

  1. mapping.postgis.xml.inc
  1. osm.postgis.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE ImageMosaicJDBCConfig [ ]> &mapping; &connect;

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Hi Christian-

Not sure if I thanked you for your response. I’m building my interface in fits and starts, so my attention does get distracted.

I am using the postgis raster extension and am using the tutorials you recommend as my starting point. Everything works fine up to the point I describe. My thought is that it is an environment issue, I’ll ask my SA and will let you know how it goes.

Thank you for your kind response!

Best-

Stephanie

···

On Mon, Dec 1, 2014 at 11:38 PM, Granger, Stephanie L (329M) <stephanie.l.granger@anonymised.com> wrote:

Hello-

New to geoserver, postgres and openlayers…

I’m building an opengeo web map tool using postgis, geoserver and openlayers. My postgis db contains both vector and raster data and I want to access the rasters from the db and publish as WCS to OpenLayers via geoserver.

I’ve followed the tutorial to given here: http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I’m using the examples exactly as written (except for username, passwd, dbname…) and it all works great up until I get to the “Importing the image data” section and type in the command below:

java -jar /usr/local/tomcat/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-11.0.jar import -config /usr/local/tomcat/webapps/geoserver/data/coverages/osm.postgis.xml -spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png

I am getting the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:649)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:367)
at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

I’ve checked and rechecked the jdbcURL in my connect.postgis.xml.inc file (it’s correct). I’ve checked and re-checked the username and password of the postgis database (both correct as well).

For a different application I wrote a simple java tool to query the database and it works using the same URL, username and password that are in the connect.postgis.xml.inc file.

Am I missing something in my ~/tomcat/webapps/geoserver directory structure?

Really appreciate any insight you can offer.

Thanks in advance.

Stephanie

Oh…config files are here…

1> connect.postgis.xml.inc

  1. mapping.postgis.xml.inc
  1. osm.postgis.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE ImageMosaicJDBCConfig [ ]> &mapping; &connect;

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Hi Stephanie

Be aware of the fact that the error described in the first mail happens during importing the image data using geotools. Postgis raster has its own import tool and you have to use it.

Cheers
Christian

···

On Thu, Dec 11, 2014 at 6:28 PM, Granger, Stephanie L (329M) <stephanie.l.granger@anonymised.com…4699…> wrote:

Hi Christian-

Not sure if I thanked you for your response. I’m building my interface in fits and starts, so my attention does get distracted.

I am using the postgis raster extension and am using the tutorials you recommend as my starting point. Everything works fine up to the point I describe. My thought is that it is an environment issue, I’ll ask my SA and will let you know how it goes.

Thank you for your kind response!

Best-

Stephanie


From: Christian Mueller [christian.mueller@anonymised.com]
Sent: Tuesday, December 02, 2014 1:55 AM
To: Granger, Stephanie L (329M)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Connecting PostGIS (raster) to GeoSERVER

Hi Stephanie

No idea about the error, maybe I can start a debug session with your config files. On the other side, I would recommend to use the postgis raster extension

http://postgis.net/docs/RT_reference.html

The extension is available since POSTGIS 2.0. The tutorial is for POSTGIS with versions < 2.0 and uses BLOBs to store image data. Since version 2.0, there is a special data type RASTER with a lot of useful functions.

Importing raster data is described here

http://postgis.net/docs/using_raster_dataman.html#RT_Loading_Rasters

Configuring GeoServer for PostGis Raster is described here

http://docs.geoserver.org/stable/en/user/data/raster/postgisraster.html

Hope this helps

Cheers
Christian

On Mon, Dec 1, 2014 at 11:38 PM, Granger, Stephanie L (329M) <stephanie.l.granger@anonymised.com> wrote:

Hello-

New to geoserver, postgres and openlayers…

I’m building an opengeo web map tool using postgis, geoserver and openlayers. My postgis db contains both vector and raster data and I want to access the rasters from the db and publish as WCS to OpenLayers via geoserver.

I’ve followed the tutorial to given here: http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I’m using the examples exactly as written (except for username, passwd, dbname…) and it all works great up until I get to the “Importing the image data” section and type in the command below:

java -jar /usr/local/tomcat/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-11.0.jar import -config /usr/local/tomcat/webapps/geoserver/data/coverages/osm.postgis.xml -spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png

I am getting the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:649)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:367)
at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

I’ve checked and rechecked the jdbcURL in my connect.postgis.xml.inc file (it’s correct). I’ve checked and re-checked the username and password of the postgis database (both correct as well).

For a different application I wrote a simple java tool to query the database and it works using the same URL, username and password that are in the connect.postgis.xml.inc file.

Am I missing something in my ~/tomcat/webapps/geoserver directory structure?

Really appreciate any insight you can offer.

Thanks in advance.

Stephanie

Oh…config files are here…

1> connect.postgis.xml.inc

  1. mapping.postgis.xml.inc
  1. osm.postgis.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE ImageMosaicJDBCConfig [ ]> &mapping; &connect;

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Thanks.

···

On Thu, Dec 11, 2014 at 6:28 PM, Granger, Stephanie L (329M) <stephanie.l.granger@anonymised.com> wrote:

Hi Christian-

Not sure if I thanked you for your response. I’m building my interface in fits and starts, so my attention does get distracted.

I am using the postgis raster extension and am using the tutorials you recommend as my starting point. Everything works fine up to the point I describe. My thought is that it is an environment issue, I’ll ask my SA and will let you know how it goes.

Thank you for your kind response!

Best-

Stephanie


From: Christian Mueller [christian.mueller@anonymised.com]
Sent: Tuesday, December 02, 2014 1:55 AM
To: Granger, Stephanie L (329M)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Connecting PostGIS (raster) to GeoSERVER

Hi Stephanie

No idea about the error, maybe I can start a debug session with your config files. On the other side, I would recommend to use the postgis raster extension

http://postgis.net/docs/RT_reference.html

The extension is available since POSTGIS 2.0. The tutorial is for POSTGIS with versions < 2.0 and uses BLOBs to store image data. Since version 2.0, there is a special data type RASTER with a lot of useful functions.

Importing raster data is described here

http://postgis.net/docs/using_raster_dataman.html#RT_Loading_Rasters

Configuring GeoServer for PostGis Raster is described here

http://docs.geoserver.org/stable/en/user/data/raster/postgisraster.html

Hope this helps

Cheers
Christian

On Mon, Dec 1, 2014 at 11:38 PM, Granger, Stephanie L (329M) <stephanie.l.granger@anonymised.com> wrote:

Hello-

New to geoserver, postgres and openlayers…

I’m building an opengeo web map tool using postgis, geoserver and openlayers. My postgis db contains both vector and raster data and I want to access the rasters from the db and publish as WCS to OpenLayers via geoserver.

I’ve followed the tutorial to given here: http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I’m using the examples exactly as written (except for username, passwd, dbname…) and it all works great up until I get to the “Importing the image data” section and type in the command below:

java -jar /usr/local/tomcat/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-11.0.jar import -config /usr/local/tomcat/webapps/geoserver/data/coverages/osm.postgis.xml -spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png

I am getting the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:649)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:367)
at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

I’ve checked and rechecked the jdbcURL in my connect.postgis.xml.inc file (it’s correct). I’ve checked and re-checked the username and password of the postgis database (both correct as well).

For a different application I wrote a simple java tool to query the database and it works using the same URL, username and password that are in the connect.postgis.xml.inc file.

Am I missing something in my ~/tomcat/webapps/geoserver directory structure?

Really appreciate any insight you can offer.

Thanks in advance.

Stephanie

Oh…config files are here…

1> connect.postgis.xml.inc

  1. mapping.postgis.xml.inc
  1. osm.postgis.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE ImageMosaicJDBCConfig [ ]> &mapping; &connect;

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH