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 [[email protected]]
Sent: Tuesday, December 02, 2014 1:55 AM
To: Granger, Stephanie L (329M)
Cc: [email protected]
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)
<[email protected]<mailto:[email protected]>>
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
<connect>
<!-- value DBCP or JNDI -->
<dstype value = "DBCP"/>
<!-- <jndiReferenceName value=""/>-->
<username value="myusername"/>
<password value="mypasswd"/>
<jdbcURL value="jdbc:postgresql://localhost:5432/mydb" />
<driverClassName value="org.postgresql.Driver"/>
<maxActive value="10"/>
<minIdle value="0"/>
</connect>
2. mapping.postgis.xml.inc
<!-- possible values: universal,postgis,db2,mysql,oracle -->
<spatialExtension name="postgis"/>
<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" />
<spatialTableNameAtribute name="SpatialTable" />
</masterTable>
<tileTable>
<blobAttributeName name="data" />
<keyAttributeName name="location" />
</tileTable>
<spatialTable>
<keyAttributeName name="location" />
<geomAttributeName name="geom" />
<tileMaxXAttribute name="maxX"/>
<tileMaxYAttribute name="maxY"/>
<tileMinXAttribute name="minX"/>
<tileMinYAttribute name="minY"/>
</spatialTable>
</mapping>
3. osm.postgis.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ImageMosaicJDBCConfig [
<!ENTITY mapping PUBLIC "mapping" "mapping.postgis.xml.inc">
<!ENTITY connect PUBLIC "connect" "connect.postgis.xml.inc">]>
<config version="1.0">
<coverageName name="osm"/>
<coordsys name="EPSG:4326"/>
<!-- interpolation 1 = nearest neighbour, 2 = bilinear, 3 = bicubic -->
<scaleop interpolation="1"/>
<verify cardinality="false"/>
&mapping;
&connect;
</config>
------------------------------------------------------------------------------
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
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH
------------------------------------------------------------------------------
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=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users