0

I'm trying to get postgis raster layers in geoserver-2.3.1, with postgresql-8.4, postgis-2.0 and gt-imagemosaic-jdbc-9.1.jar support. I'm going through the tutorial with a PNG raster that i have. In the last step i'm stuck with a java exception...can't really understand what is it!? I've tried other jdbc-postgresql driver and less tiles but the error seems to come up everytime.

Here is the output! Any interpretations? Every help is welcome. Thanks

java -jar ~rdfs_run/geoserver/geoserver-2.3.1/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-9.1.jar import -config ~rdfs_run/geoserver/geoserver-2.3.1/data_dir/coverages/postgis/aveiro.postgis.xml -spatialTNPrefix tileaveiro -tileTNPrefix tileaveiro -dir tiles -ext png
Apr 28, 2013 8:50:34 PM org.geotools.gce.imagemosaic.jdbc.Import logInfo
INFO: Truncating table : tileaveiro_0
Apr 28, 2013 8:50:34 PM org.geotools.gce.imagemosaic.jdbc.Import logInfo
INFO: Number of tiles to import: 48
Apr 28, 2013 8:50:34 PM org.geotools.gce.imagemosaic.jdbc.Import logInfo
INFO: Inserted tile AveiroRDFS_rgb_5_8.png : 1/48
...    
INFO: Inserted tile AveiroRDFS_rgb_3_8.png : 48/48
    java.sql.BatchUpdateException: Batch entry 0 INSERT INTO tileaveiro_0 (location,geom,data) VALUES  ('AveiroRDFS_rgb_5_8.png',geomfromwkb(?,4326),?) was aborted.  Call getNextException to see the cause.
        at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893)
        at org.geotools.gce.imagemosaic.jdbc.Import.sqlCommit(Import.java:1026)
        at org.geotools.gce.imagemosaic.jdbc.Import.fillSpatialTable(Import.java:856)
        at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:401)
        at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

1 Answer 1

1

Found the answer...gt-imagemosaic-jdbc-9.1 plugin (from Geotools) probably doesn't support PostGIS 2.0: geomfromwkb function is not defined - in newer versions it is st_geomfromwkb.

Right now i'm using an older postgis/postgres database.

1
  • 1
    If you load the legacy.sql file it will provide the function signature you need. Sep 29, 2013 at 4:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.