Hi Christian

Please use this tutorial
>
> http://docs.geotools.org/latest/userguide/library/coverage/pgraster.html
>

I tried to follow steps from here:

http://docs.geoserver.org/stable/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

Comparing with the other tutorial I found some major differences:
1) importing raster into PostGIS is performed using raster2psql in the link
you sent, and this will produce a standard PostGIS raster while in the
tutorial in GeoServer documentation the imagemosaic jdbc jar is used and
this will create a different type of data. More specifically It seems to me
that using the jar tiles are loaded in a PostgreSQL bytea field, while
using raster2psql will create a raster field.
2) the suggested template for the mapping xml file is a bit different. It
seems that collowing code is not needed in the geotools tutorial:

<spatialTable>
      <keyAttributeName name="location" />
      <geomAttributeName name="geom" />
      <tileMaxXAttribute name="maxX"/>
      <tileMaxYAttribute name="maxY"/>
      <tileMinXAttribute name="minX"/>
      <tileMinYAttribute name="minY"/>
    </spatialTable>



> I have seen that your mapping file has out commented  the mix/max
> attributes. Why ?
>
 Uh I forgot to remove the comment, I first tried without it but got the
same error. Then I had a look at the tables and noted the spatial table not
having the fields and wondering if this may be an issue. I have attached
the DDL generated by image mosaic jdbc jar
I also tried to remove the comment in the XML mapping file but I got the
same error. I have included full geoserver log

Cheers

Stefano


---------------------------------------------------
41.95581N 12.52854E


http://www.linkedin.com/in/stefanoiacovella

http://twitter.com/#!/Iacovellas
INSERT INTO mosaic(name,tiletable,spatialtable) VALUES 
('osm','tileosm_0','tileosm_0');
INSERT INTO mosaic(name,tiletable,spatialtable) VALUES 
('osm','tileosm_1','tileosm_1');
INSERT INTO mosaic(name,tiletable,spatialtable) VALUES 
('osm','tileosm_2','tileosm_2');

 CREATE TABLE tileosm_0 (location CHAR(64) NOT NULL ,data BYTEA,CONSTRAINT 
tileosm_0_PK PRIMARY KEY(location));
 CREATE TABLE tileosm_1 (location CHAR(64) NOT NULL ,data BYTEA,CONSTRAINT 
tileosm_1_PK PRIMARY KEY(location));
 CREATE TABLE tileosm_2 (location CHAR(64) NOT NULL ,data BYTEA,CONSTRAINT 
tileosm_2_PK PRIMARY KEY(location));

select AddGeometryColumn('tileosm_0','geom',4326,'MULTIPOLYGON',2);
select AddGeometryColumn('tileosm_1','geom',4326,'MULTIPOLYGON',2);
select AddGeometryColumn('tileosm_2','geom',4326,'MULTIPOLYGON',2);

CREATE INDEX IX_tileosm_0 ON tileosm_0 USING gist(geom) ;
CREATE INDEX IX_tileosm_1 ON tileosm_1 USING gist(geom) ;
CREATE INDEX IX_tileosm_2 ON tileosm_2 USING gist(geom) ;
CREATE TABLE mosaic(name CHARACTER (64)  NOT NULL,spatialtable VARCHAR (128)  
NOT NULL,tiletable VARCHAR (128)  NOT NULL,resx FLOAT8,resy FLOAT8,minx 
FLOAT8,miny FLOAT8,maxx FLOAT8,maxy FLOAT8,CONSTRAINT MASTER_PK PRIMARY KEY 
(name,spatialtable,tiletable));

Attachment: geoserver.log
Description: Binary data

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to