I've messed with v.to.db a bit more and am getting very strange results. I
admit that I might not be putting in correct values (though I'm trying to
follow the example). But v.to.db is putting in values that I am not. Below
is an example.
v.to.db map=subsector type=point,line,boundary,centroid layer=1 qlayer=1
option=query column=survey qcolumn=count(*) -p
Reading data trom the map ...
Querying database ...
DBMI-DBF driver error:
SQL parser error in statement:
SELECT count(*) FROM subsector WHERE cat = 28
Error in db_open_select_cursor()
Cannot open cursor: 'SELECT count(*) FROM subsector WHERE cat = 28'
So where is the clause 'WHERE cat=28' coming from??? I certainly didn't
specify that. How can I actually make a query?
Michael
____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>
Michael Barton wrote:
I've messed with v.to.db a bit more and am getting very strange results. I
admit that I might not be putting in correct values (though I'm trying to
follow the example). But v.to.db is putting in values that I am not. Below
is an example.
v.to.db map=subsector type=point,line,boundary,centroid layer=1 qlayer=1
option=query column=survey qcolumn=count(*) -p
Reading data trom the map ...
Querying database ...
DBMI-DBF driver error:
SQL parser error in statement:
SELECT count(*) FROM subsector WHERE cat = 28
Error in db_open_select_cursor()
Cannot open cursor: 'SELECT count(*) FROM subsector WHERE cat = 28'
So where is the clause 'WHERE cat=28' coming from??? I certainly didn't
specify that. How can I actually make a query?
The count() is not supported by dbf driver.
With option=query, you can make a query for attributes of one layer and upload results to attribute table of another layer. layer = qlayer does not make sense. For example, if you have a map of overlapping areas (e.g. fires of forest) as layer 1, you can add a new layer 2 and count for each area number of fires.
Radim