[GRASSLIST:218] Postgresql connectivity

hi,
   I am currently working on Linux 7.1 platform with GRASS 5.0.0 environment and Postgresql as database. I have created my login and password.GRASS is working fine.When I want to work on database, I login as root (su and password) in the GRASS prompt and then type the following line :
/home/vaish/bin/postmaster -i -p 5432 -D /home/vaish/psqldata >logfile 2>&1 &
where postmaster is in /home/vaish/bin directory and psqldatabase is in /home/vaish directory (in my system).
After executing the above line, I exit the root (through Ctrl-D) and try to access a database by the command g.select.pg.
By executing the command "g.select.pg database=test" (for example taking 'test' as a database). I get the following error:

Error: select Postgres:could not connect to server:Connection refused
       IS the server runningon host localhost and accepting
       TCP/IP connections on port 5432?
Although g.select.pg -l is working fine and is displaying all the databases in the UNIX catalogue.

What is this error ?
Can anybody help ?

uttam.

_________________________________________________________________
Attention NRIs! Send money to India. http://server1.msn.co.in/msnleads/citibankrca/citibankrca2.asp Do it in a jiffy!

Check the permissions in the pg_hba.conf file, which should be in /home/vaish/psqldata. At the bottom you should have something like:
host all all 127.0.0.1 255.255.255.255 trust

psql is probably connecting via a socket, while GRASS is connecting via ip.

Rich

At 06:10 PM 5/27/2003 +0530, you wrote:

hi,
  I am currently working on Linux 7.1 platform with GRASS 5.0.0 environment and Postgresql as database. I have created my login and password.GRASS is working fine.When I want to work on database, I login as root (su and password) in the GRASS prompt and then type the following line :
/home/vaish/bin/postmaster -i -p 5432 -D /home/vaish/psqldata >logfile 2>&1 &
where postmaster is in /home/vaish/bin directory and psqldatabase is in /home/vaish directory (in my system).
After executing the above line, I exit the root (through Ctrl-D) and try to access a database by the command g.select.pg.
By executing the command "g.select.pg database=test" (for example taking 'test' as a database). I get the following error:

Error: select Postgres:could not connect to server:Connection refused
      IS the server runningon host localhost and accepting
      TCP/IP connections on port 5432?
Although g.select.pg -l is working fine and is displaying all the databases in the UNIX catalogue.

What is this error ?
Can anybody help ?

uttam.

_________________________________________________________________
Attention NRIs! Send money to India. http://server1.msn.co.in/msnleads/citibankrca/citibankrca2.asp Do it in a jiffy!

Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich@GreenwoodMap.com
(307) 733-0203
http://www.GreenwoodMap.com

Uttam Kumar wrote:

hi,
  I am currently working on Linux 7.1 platform with GRASS 5.0.0 environment and Postgresql as database. I have created my login and password.GRASS is working fine.When I want to work on database, I login as root (su and password) in the GRASS prompt and then type the following line :
/home/vaish/bin/postmaster -i -p 5432 -D /home/vaish/psqldata >logfile 2>&1 &

You don't need the -i option, if you use Unix socket.

Uttam Kumar wrote:

hi,
   I am currently working on Linux 7.1 platform with GRASS 5.0.0 environment
and Postgresql as database. I have created my login and password.GRASS is
working fine.When I want to work on database, I login as root (su and
password) in the GRASS prompt and then type the following line :
/home/vaish/bin/postmaster -i -p 5432 -D /home/vaish/psqldata >logfile 2>&1 &
where postmaster is in /home/vaish/bin directory and psqldatabase is in
/home/vaish directory (in my system).
After executing the above line, I exit the root (through Ctrl-D) and try to
access a database by the command g.select.pg.
By executing the command "g.select.pg database=test" (for example taking
'test' as a database). I get the following error:

Error: select Postgres:could not connect to server:Connection refused
       IS the server runningon host localhost and accepting
       TCP/IP connections on port 5432?
Although g.select.pg -l is working fine and is displaying all the databases
in the UNIX catalogue.

What is this error ?

I suspect that g.select.pg is attempting to use a TCP connection, but
the server isn't configured to accept it.

There is a known issue with the database handling: once you specify a
hostname via "g.select.pg host=...", the only way to revert to a local
connection (Unix domain socket) is to manually remove the PG_HOST
entry from the ~/.grassrc5 file.

--
Glynn Clements <glynn.clements@virgin.net>

List:

I am trying to use v.vol.rst in GRASS 6.1cvs on a Linux system. First, using the command:

v.vol.rst -c input=sta_obs_temp_20050731_08 wcolumn=temp maskmap=gtopo30.eastern.us segmax=700 tension=10 cvdev=cvdev_map

I get the following:

118 records selected from table
WARNING: some points outside of region -- will ignore...
WARNING: strip exists with insufficient data
Processing all selected output files will require 0 bytes of disk space for temp files

WARNING: There are points outside specified 2D/3D region--ignored 118 points (total points: 118)
ERROR: zero points in the given region!
ERROR: input failed!

I just don't understand what's going on; all the points appear when I display them. I'm able to query the points and perform other analyses, such as, v.surf.idw.

Regards,
Tom

--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

On Tue, Feb 21, 2006 at 11:13:52AM -0500, Thomas Adams wrote:

List:

I am trying to use v.vol.rst in GRASS 6.1cvs on a Linux system. First,
using the command:

v.vol.rst -c input=sta_obs_temp_20050731_08 wcolumn=temp
maskmap=gtopo30.eastern.us segmax=700 tension=10 cvdev=cvdev_map

I get the following:

118 records selected from table
WARNING: some points outside of region -- will ignore...
WARNING: strip exists with insufficient data
Processing all selected output files will require 0 bytes of disk space
for temp files

WARNING: There are points outside specified 2D/3D region--ignored 118
points (total points: 118)
ERROR: zero points in the given region!
ERROR: input failed!

I just don't understand what's going on; all the points appear when I
display them. I'm able to query the points and perform other analyses,
such as, v.surf.idw.

Regards,

Tom,

please check with

v.info sta_obs_temp_20050731_08

top and bottom of the data (since we are using 3D data here).

Then check with
g.region -p3

if the volume region settings are defined appropriately
("There are points outside specified 2D/3D region--ignored 118").

I assume that you have to define the volume properly.
Please suggest a better error message.

Regards

Markus

Markus,

I did as you suggested — it looks OK to me, although I'm not sure. Please see the attachment.

Tom

Markus Neteler wrote:

On Tue, Feb 21, 2006 at 11:13:52AM -0500, Thomas Adams wrote:

List:

I am trying to use v.vol.rst in GRASS 6.1cvs on a Linux system. First, using the command:

v.vol.rst -c input=sta_obs_temp_20050731_08 wcolumn=temp maskmap=gtopo30.eastern.us segmax=700 tension=10 cvdev=cvdev_map

I get the following:

118 records selected from table
WARNING: some points outside of region -- will ignore...
WARNING: strip exists with insufficient data
Processing all selected output files will require 0 bytes of disk space for temp files

WARNING: There are points outside specified 2D/3D region--ignored 118 points (total points: 118)
ERROR: zero points in the given region!
ERROR: input failed!

I just don't understand what's going on; all the points appear when I display them. I'm able to query the points and perform other analyses, such as, v.surf.idw.

Regards,
   
Tom,

please check with

v.info sta_obs_temp_20050731_08

top and bottom of the data (since we are using 3D data here).

Then check with
g.region -p3

if the volume region settings are defined appropriately
("There are points outside specified 2D/3D region--ignored 118").

I assume that you have to define the volume properly.
Please suggest a better error message.

Regards

Markus

--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

(attachments)

mm5.region.settings (2.66 KB)

Tom,

the settings are not right:

v.info ...
| B: 99.000 T: 1155.000 |

g.region -p3
top: 1.00000000
bottom: 0.00000000

You see that the 3D region is defined from 0 to 1 meter while
3D points are "flying" from 99 to 1155 meters.

You will have to use
       t Value for the top edge
       b Value for the bottom edge
    res3 3D grid resolution (north-south, east-west and top-bottom)
of g.region to get it right.

Markus

On Tue, Feb 21, 2006 at 11:36:51AM -0500, Thomas Adams wrote:

Markus,

I did as you suggested ? it looks OK to me, although I'm not sure.
Please see the attachment.

Tom

Markus Neteler wrote:

>On Tue, Feb 21, 2006 at 11:13:52AM -0500, Thomas Adams wrote:
>
>
>>List:
>>
>>I am trying to use v.vol.rst in GRASS 6.1cvs on a Linux system. First,
>>using the command:
>>
>>v.vol.rst -c input=sta_obs_temp_20050731_08 wcolumn=temp
>>maskmap=gtopo30.eastern.us segmax=700 tension=10 cvdev=cvdev_map
>>
>>I get the following:
>>
>>118 records selected from table
>>WARNING: some points outside of region -- will ignore...
>>WARNING: strip exists with insufficient data
>>Processing all selected output files will require 0 bytes of disk space
>>for temp files
>>
>>WARNING: There are points outside specified 2D/3D region--ignored 118
>>points (total points: 118)
>>ERROR: zero points in the given region!
>>ERROR: input failed!
>>
>>I just don't understand what's going on; all the points appear when I
>>display them. I'm able to query the points and perform other analyses,
>>such as, v.surf.idw.
>>
>>Regards,
>>
>>
>
>Tom,
>
>please check with
>
>v.info sta_obs_temp_20050731_08
>
>top and bottom of the data (since we are using 3D data here).
>
>Then check with
>g.region -p3
>
>if the volume region settings are defined appropriately
>("There are points outside specified 2D/3D region--ignored 118").
>
>I assume that you have to define the volume properly.
>Please suggest a better error message.
>
>Regards
>
>Markus
>
>
>

--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

GRASS-GRID > v.info sta_obs_temp_20050731_08
+----------------------------------------------------------------------------+
| Layer: sta_obs_temp_20050731_08 Organization: |
| Mapset: tea Source Date: |
| Location: mm5 Name of creator: |
| Database: /grass/data |
| Title: |
| Map Scale: 1:1 |
| Map format: native |
|----------------------------------------------------------------------------|
| Type of Map: Vector (level: 2) |
| |
| Number of points: 118 Number of areas: 0 |
| Number of lines: 0 Number of islands: 0 |
| Number of boundaries: 0 Number of faces: 0 |
| Number of centroids: 0 Number of kernels: 0 |
| |
| Map is 3D: 1 |
| Number of dblinks: 1 |
| |
| Projection: Lambert Conformal Conic (zone 0) |
| N: 398185.942 S: -342056.941 |
| E: 632334.575 W: -364736.996 |
| B: 99.000 T: 1155.000 |
| |
| Digitize threshold: 0.00000 |
| Comments: |
| |
+----------------------------------------------------------------------------+

Mapset <tea> in Location <mm5>
GRASS-GRID > g.region -p3
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 486000
south: -486000
west: -351000
east: 675000
top: 1.00000000
bottom: 0.00000000
nsres: 9000
nsres3: 1
ewres: 9000
ewres3: 1
tbres: 1
rows: 108
rows3: 972000
cols: 114
cols3: 1026000
depths: 1

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Markus,

Thank you very much! Obviously my first time working with 3D in GRASS. A procedural question: typically when would the B & T boundaries be set? My guess is that it depends on the dataset one is working with, so it needs to be reset depending on the vertical range of the (elevation) data?

Tom

Markus Neteler wrote:

Tom,

the settings are not right:

v.info ...
| B: 99.000 T: 1155.000 |

g.region -p3
top: 1.00000000
bottom: 0.00000000

You see that the 3D region is defined from 0 to 1 meter while
3D points are "flying" from 99 to 1155 meters.

You will have to use
      t Value for the top edge
      b Value for the bottom edge
   res3 3D grid resolution (north-south, east-west and top-bottom)
of g.region to get it right.

Markus

On Tue, Feb 21, 2006 at 11:36:51AM -0500, Thomas Adams wrote:

Markus,

I did as you suggested ? it looks OK to me, although I'm not sure. Please see the attachment.

Tom

Markus Neteler wrote:

On Tue, Feb 21, 2006 at 11:13:52AM -0500, Thomas Adams wrote:

List:

I am trying to use v.vol.rst in GRASS 6.1cvs on a Linux system. First, using the command:

v.vol.rst -c input=sta_obs_temp_20050731_08 wcolumn=temp maskmap=gtopo30.eastern.us segmax=700 tension=10 cvdev=cvdev_map

I get the following:

118 records selected from table
WARNING: some points outside of region -- will ignore...
WARNING: strip exists with insufficient data
Processing all selected output files will require 0 bytes of disk space for temp files

WARNING: There are points outside specified 2D/3D region--ignored 118 points (total points: 118)
ERROR: zero points in the given region!
ERROR: input failed!

I just don't understand what's going on; all the points appear when I display them. I'm able to query the points and perform other analyses, such as, v.surf.idw.

Regards,

Tom,

please check with

v.info sta_obs_temp_20050731_08

top and bottom of the data (since we are using 3D data here).

Then check with
g.region -p3

if the volume region settings are defined appropriately
("There are points outside specified 2D/3D region--ignored 118").

I assume that you have to define the volume properly.
Please suggest a better error message.

Regards

Markus

--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

GRASS-GRID > v.info sta_obs_temp_20050731_08
+----------------------------------------------------------------------------+
| Layer: sta_obs_temp_20050731_08 Organization: |
| Mapset: tea Source Date: |
| Location: mm5 Name of creator: |
| Database: /grass/data |
| Title: |
| Map Scale: 1:1 |
| Map format: native |
|----------------------------------------------------------------------------|
| Type of Map: Vector (level: 2) |
| |
| Number of points: 118 Number of areas: 0 |
| Number of lines: 0 Number of islands: 0 |
| Number of boundaries: 0 Number of faces: 0 |
| Number of centroids: 0 Number of kernels: 0 |
| |
| Map is 3D: 1 |
| Number of dblinks: 1 |
| |
| Projection: Lambert Conformal Conic (zone 0) |
| N: 398185.942 S: -342056.941 |
| E: 632334.575 W: -364736.996 |
| B: 99.000 T: 1155.000 |
| |
| Digitize threshold: 0.00000 |
| Comments: |
| |
+----------------------------------------------------------------------------+

Mapset <tea> in Location <mm5>
GRASS-GRID > g.region -p3
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 486000
south: -486000
west: -351000
east: 675000
top: 1.00000000
bottom: 0.00000000
nsres: 9000
nsres3: 1
ewres: 9000
ewres3: 1
tbres: 1
rows: 108
rows3: 972000
cols: 114
cols3: 1026000
depths: 1

--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

Thomas Adams wrote:

Markus,

Thank you very much! Obviously my first time working with 3D in GRASS.
A procedural question: typically when would the B & T boundaries be
set? My guess is that it depends on the dataset one is working with,
so it needs to be reset depending on the vertical range of the
(elevation) data?

Tom,

glad to know that it works (last time I was asked that I debugged 2
hours to figure out :slight_smile:
Please suggest a text piece to add to the description for future users
having this problem.

Concerning your question: AFAIK, in most cases you can make a single
layer of, say,
0m ..4000m height (see r.range -r elevationmap). Then interpolation is
even faster.

If you want to generate layers at different elevations (e.g., when
interpolating atmospheric
issues), then you have to define several layers in the volume.

In fact, it depends on problem & data.

cheers
Markus