Thanks one last question that isn't quite covered in the tutorial.
http://docs.geotools.org/latest/userguide/library/coverage/jdbc/setup.html

For my test case, I have ingested a 30mb geotiff into my database using the
raster2pgsql executable using -l to create overviews/pyramides inside the
database.

raster2pgsql -C -x -I -Y -F -s 4326 -t 250x250 -l 2,4,8,16,32,64
glc2000_v1_1.tif  glc2000 | psql -d database

This command results in creating six overview tables and primary raster
data table. The overviews and the primary table all have the following
schema.


  Column  |  Type   |                         Modifiers
----------+---------+-----------------------------------------------------------
 rid      | integer | not null default
nextval('o_2_glc2000_rid_seq'::regclass)
 rast     | raster  |
 filename | text    |
Indexes:
    "o_2_glc2000_pkey" PRIMARY KEY, btree (rid)
    "o_2_glc2000_rast_gist" gist (st_convexhull(rast))


What I would like understand is how the mapping.xml aligns with the
raster2pgsql commands.
http://docs.geotools.org/latest/userguide/library/coverage/jdbc/meta.html
In this case, I have created a new table "meta" within the database that
uses the following field definitions.

name: glc2000 (is the same for every record)  This could be altered to for
tables within schemas like myschema.glc2000
spatialtable: overview table names (glc2000, o_2_glc2000, o_4_glc2000...etc)
rid: raster_id (right now this is integer but I could cast it to varchar)
the rest of the fields are all blank



             Table "public.meta"
    Column    |       Type       | Modifiers
--------------+------------------+-----------
 name         | text             |
 spatialtable | text             |
 rid          | integer          |
 resx         | double precision |
 resy         | double precision |
 minx         | double precision |
 miny         | double precision |
 maxx         | double precision |
 maxy         | double precision |


What modifications do I need to make in the mapping.xml to correspond with
this?

<spatialExtension name="postgis"/>
<mapping>
<masterTable name="meta" >
<coverageNameAttribute name="name"/>
<spatialTableNameAttribute name="spatialtable" />
<tileTableNameAttribute name="TileTable" />
<maxXAttribute name="maxx"/>
<maxYAttribute name="maxy"/>
<minXAttribute name="minx"/>
<minYAttribute name="miny"/>
<resXAttribute name="resx"/>
<resYAttribute name="resy"/>
</masterTable>
<tileTable>
<blobAttributeName name="rid" />
<blobAttributeName name="geom" />
</tileTable>
</mapping>

My thoughts are to remove tiletableNameAttribute and then add in the
geometry column and update it properly.

On Wed, Jul 1, 2015 at 6:48 AM, Christian Mueller <
[email protected]> wrote:

> HI David
>
> Looks like a connection problem. Did you configure PostGres for remote
> access ?
>
>
> http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html
>
> Cheers
> Christian
>
> On Tue, Jun 30, 2015 at 4:22 PM, David Haynes II <[email protected]> wrote:
>
>> Here is the error log. Hope that helps.
>>
>>
>> On Tue, Jun 30, 2015 at 8:33 AM, Christian Mueller <
>> [email protected]> wrote:
>>
>>> Hi David
>>>
>>> Do you see a stack trace in the GeoServer  log file.
>>>
>>> Cheers
>>> Christian
>>>
>>> On Tue, Jun 30, 2015 at 3:24 PM, David Haynes II <[email protected]>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am trying to build an app that utilizes raster files that I have
>>>> ingested into my PostgreSQL/PostGIS database. The error occurs when trying
>>>> to make the PostGIS raster data store. The error on the web interface says
>>>> "Could not list layers for this store, an error occurred retrieving them:
>>>> Failed to create reader from file:glc.postgis.xml and hints null".
>>>>
>>>> However the geoserver log reports a connection error.
>>>> 2015-06-29 09:02:30,681 WARN [data.jdbc] - Could not acquire A BDCP
>>>> connection pool.:org.geotools.data.DataSourceException: Connection pool
>>>> improperly set up: Cannot create PoolableConnectionFactory (Connection
>>>> refused. Check that the hostname and port are correct and that the
>>>> postmaster is accepting TCP/IP connections.)
>>>>
>>>> What is wrong?
>>>>
>>>> I know that I have the connection xml defined properly. I am following
>>>> the following documentation.
>>>>
>>>> http://docs.geoserver.org/2.5.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html
>>>>
>>>> <connect>
>>>> <dstype value="DBCP"/>
>>>> <username value="user"/>
>>>> <password value="######"/>
>>>> <jdbcUrl value="jdbc:postgresql://host:port/database"/>
>>>> <driverClassName value="org.postgresql.Driver"/>
>>>> <maxActive value="10"/>
>>>> <maxIdle value="0"/>
>>>> </connect>
>>>>
>>>>
>>>> --
>>>> David Haynes, Ph.D.
>>>> Research Associate Terra Populus
>>>> Minnesota Population Center
>>>> www.terrapop.org
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Don't Limit Your Business. Reach for the Cloud.
>>>> GigeNET's Cloud Solutions provide you with the tools and support that
>>>> you need to offload your IT needs and focus on growing your business.
>>>> Configured For All Businesses. Start Your Cloud Today.
>>>> https://www.gigenetcloud.com/
>>>> _______________________________________________
>>>> Geoserver-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>
>>>>
>>>
>>>
>>> --
>>> DI Christian Mueller MSc (GIS), MSc (IT-Security)
>>> OSS Open Source Solutions GmbH
>>>
>>>
>>
>>
>> --
>> David Haynes, Ph.D.
>> Research Associate Terra Populus
>> Minnesota Population Center
>> www.terrapop.org
>>
>
>
>
> --
> DI Christian Mueller MSc (GIS), MSc (IT-Security)
> OSS Open Source Solutions GmbH
>
>


-- 
David Haynes, Ph.D.
Research Associate Terra Populus
Minnesota Population Center
www.terrapop.org
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to