At 12:15 PM 11/19/2008, Kevin Webb wrote:

--Workflow--
A LOCATION was created tailored to the specifics of the layer
I am processing. The layer itself was imported using:
v.external, followed by v.category, followed by v.db.connect.


Am I doing this incorrectly?
Should I expect the three methods to yield the same result?
Which method is suggested to be the most reliable?

Thank you.


KFW

I decided to run v.select, v.distance, and v.what comparisons on another
layer that I have imported using v.external. The 3 query techniques all
returned the same value which lead me to believe that it was something
I had done improperly on the import sequence for the layer that was giving
me erroneous results; investigation yields more questions.

--The layer for which v.select, v.distance and v.what results match--

GRASS 6.4.svn (PREC0101):~ > v.db.connect -p PREC0102_EXT
Vector map <[EMAIL PROTECTED]> is connected by:
layer <1> table <PREC0102> in database </home/kfw4/dev/grass_db/climate/prec/PREC0102.SHP> through driver <ogr> with key <>
GRASS 6.4.svn (PREC0101):~ > v.info -c PREC0102_EXT
Displaying column types/names for database connection of layer 1:
INTEGER|ID
INTEGER|GRIDCODE
CHARACTER|INCHES

Supposedly, queries are NOT supposed to work on this layer because v.category
has not been run - there is no category (cat) field, yet v.select, v.distance, and v.what all
work and result values are the same.

Why do queries on this layer this work?

--The layer for which v.select, v.distance, and v.what results do NOT match--

GRASS 6.4.svn (CENSUS_ESRI_04):~ > v.db.connect -p EXT_CENSUS_CAT
Vector map <[EMAIL PROTECTED]> is connected by:
layer <1> table <EXT_CENSUS_CAT> in database </home/kfw4/dev/grass_db/CENSUS_ESRI_04/PERMANENT/dbf/> through driver <dbf> with key <cat> layer <2> table <blkgrps01> in database </home/kfw4/dev/grass_db/esri_census/blkgrps01.dbf> through driver <ogr> with key <cat>
GRASS 6.4.svn (CENSUS_ESRI_04):~ > v.info -c EXT_CENSUS_CAT layer=1
Displaying column types/names for database connection of layer 1:
INTEGER|cat
GRASS 6.4.svn (CENSUS_ESRI_04):~ > v.info -c EXT_CENSUS_CAT layer=2
Displaying column types/names for database connection of layer 2:
DOUBLE PRECISION|SQMI
CHARACTER|STATE_FIPS
CHARACTER|CNTY_FIPS
CHARACTER|STCOFIPS
CHARACTER|TRACT
CHARACTER|BLKGRP
CHARACTER|FIPS
INTEGER|POP2000
DOUBLE PRECISION|POP00_SQMI
INTEGER|POP2003
INTEGER|WHITE
INTEGER|BLACK
INTEGER|AMERI_ES
INTEGER|ASIAN
INTEGER|HAWN_PI
INTEGER|OTHER
INTEGER|MULT_RACE
INTEGER|HISPANIC
INTEGER|MALES
INTEGER|FEMALES
INTEGER|AGE_UNDER5
INTEGER|AGE_5_17
INTEGER|AGE_18_21
INTEGER|AGE_22_29
INTEGER|AGE_30_39
INTEGER|AGE_40_49
INTEGER|AGE_50_64
INTEGER|AGE_65_UP
DOUBLE PRECISION|MED_AGE
DOUBLE PRECISION|MED_AGE_M
DOUBLE PRECISION|MED_AGE_F
INTEGER|HOUSEHOLDS
DOUBLE PRECISION|AVE_HH_SZ
INTEGER|HSEHLD_1_M
INTEGER|HSEHLD_1_F
INTEGER|MARHH_CHD
INTEGER|MARHH_NO_C
INTEGER|MHH_CHILD
INTEGER|FHH_CHILD
INTEGER|FAMILIES
DOUBLE PRECISION|AVE_FAM_SZ
INTEGER|HSE_UNITS
INTEGER|VACANT
INTEGER|OWNER_OCC
INTEGER|RENTER_OCC

For this layer, point-in-polygon queries are executed on layer#1, and attributes are queried from layer#2;
v.select, v.distance, and v.what all return different cat values.

v.db.connect -p indicates layer#2 is keyed by the <cat> field yet I don't see a 'cat' field in the v.info output, shouldn't there be a 'cat' column in layer#2 or am I misinterpreting how multiple layers are properly added to
a vector?

Corrections/suggestions?

Thank you.


KFW





_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to