Re: [postgis-users] Adding raster to PostGIS database

2012-11-27 Thread José Pedro Santos
rDBname -f thepreviouspath 3 - Try again to import the file Best Regards José Santos From: smaran.hari...@gmail.com Date: Mon, 26 Nov 2012 21:40:25 -0700 To: postgis-users@lists.osgeo.org Subject: Re: [postgis-users] Adding raster to PostGIS database Oh it seems the error was due to ownership being i

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Duncan Golicher
Hello Smaran, My best guess is that you aren't using a database that has PostGIS raster correctly installed. I have been trying to help some of my students to install and use PostGIS raster from scratch recently and they have had similar issues to yours and reported the same error messages. Maybe

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Smaran Harihar
Oh it seems the error was due to ownership being in the name of another user. Now I am able to get the gdalinfo, Driver: GTiff/GeoTIFF Files: Quercus_acutifolia_raw.tif Size is 3864, 1583 Coordinate System is: GEOGCS["WGS 84", DATUM["unknown", SPHEROID["WGS84",6378137,298.257223563]],

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Smaran Harihar
Hmmm. This was the output, gdalinfo failed - unable to open 'Quercus_acutifolia_raw.tif'. For gdalinfo Quercus_acutifolia_raw.tif Thanks, Smaran On Mon, Nov 26, 2012 at 3:07 PM, Bborie Park wrote: > Run the following... > > gdalinfo Quercus_acutifolia_raw.tif > > If that returns an error, s

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Bborie Park
Run the following... gdalinfo Quercus_acutifolia_raw.tif If that returns an error, something may be wrong with the tif file. -bborie On 11/26/2012 02:03 PM, Smaran Harihar wrote: > But I am executing the command in the directory where it is located > > I can list that raster using `ls` > > On

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Smaran Harihar
But I am executing the command in the directory where it is located I can list that raster using `ls` On Mon, Nov 26, 2012 at 2:46 PM, Bborie Park wrote: > That error would only happen if raster2pgsql can't find the file in your > current working directory. raster2pgsql supports relative paths

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Bborie Park
That error would only happen if raster2pgsql can't find the file in your current working directory. raster2pgsql supports relative paths for input rasters. -bborie On 11/26/2012 01:37 PM, Smaran Harihar wrote: > Thanks for the reply bborie, > > I ran this command, > > raster2pgsql -c -s 4326 -I

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Smaran Harihar
Thanks for the reply bborie, I ran this command, raster2pgsql -c -s 4326 -I Quercus_acutifolia_raw.tif public.Quercus_acutifolia_raw | psql -h localhost -d rasterdb -U postgres But this is the new error, ERROR: Unable to read raster file: Quercus_acutifolia_raw.tif Thanks, Smaran On Mon, Nov

Re: [postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Bborie Park
-D is not a valid flag recognized by raster2pgsql. Remove the flag as raster2pgsql is assuming that -D is a file. -bborie On 11/26/2012 01:23 PM, Smaran Harihar wrote: > Hi Guys, > > I am trying to add a raster to PostGIS database using, > > raster2pgsql -c -D -s 4326 -I Quercus_acutifolia_raw

[postgis-users] Adding raster to PostGIS database

2012-11-26 Thread Smaran Harihar
Hi Guys, I am trying to add a raster to PostGIS database using, raster2pgsql -c -D -s 4326 -I Quercus_acutifolia_raw.tif public.Quercus_acutifolia_raw | psql -h localhost -d dbnm -U usr But I am getting this error, ERROR: Unable to read raster file: -D Any idea what is wrong? The database alre