[GRASSLIST:429] v.in.db problem
Thomas Adams
Thomas.Adams at noaa.gov
Mon Mar 27 14:12:26 EST 2006
List:
Using GRASS 6.1CVS (2006.03.25 snapshot) I am trying to use v.in.db to
import point data from a PostgreSQL database; it *almost* works... that
is, the correct number of points import and display correctly, but it's
when I use the GUI query tool to test the *values* of the imported data
that problems are apparent.
My PostgreSQL database consists of some static fields (lat, long,
station identifier, elevation, etc.) along with the observation time
(obstime) of the data and a data value (value). So, the database table
table contains hourly observations for the past several months at many
locations. However, when I use v.in.db with the SQL where condition set
to obstime = '2006-03-26 12:00:00', the values returned appear to be the
first record in the table for each of the points, that is, I ONLY get
the oldest value -- and nothing else. I have also tried using the "SQL
where statement" field to make the same query using d.vect with no luck
(that is, no difference is apparent). Interestingly, if I try to use the
"SQL where statement" field to make the same query using d.vect with:
(1) lid='CCNO1' <---- this works, one point is selected & displayed for
the point CCNO1
(2) elev>900 <---- this works, many points with elevations exceeding
900 are selected & displayed
(3) obstime = '2006-03-26 12:00:00' <----- (seemingly) all points are
selected & displayed, but with the wrong obstime (see above)
Also interesting is the fact that if I use db.select with obstime =
'2006-03-26 12:00:00' the correct thing happens, namely, only those
records that meet the obstime condition are selected; I also get this
using psql at the command line.
I am having a hard time understanding the problem. Any help??
Tom
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177
EMAIL: thomas.adams at noaa.gov
VOICE: 937-383-0528
FAX: 937-383-0033
More information about the grass-user
mailing list