counties table structure#
Lists all Counties covered by the model area
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
county* |
INTEGER |
NO |
County FIPS code |
||
x |
REAL |
NO |
0 |
X coordinate of the county centroid. Automatically added by Polaris. |
|
y |
REAL |
NO |
0 |
Y coordinate of the county centroid. Automatically added by Polaris. |
|
name |
TEXT |
YES |
County name |
||
statefp |
TEXT |
YES |
two-digit state FP |
||
state |
TEXT |
YES |
two-digit state abbreviation |
||
geo |
MULTIPOLYGON |
YES |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS "Counties" (
county INTEGER NOT NULL PRIMARY KEY,
x REAL NOT NULL DEFAULT 0,
y REAL NOT NULL DEFAULT 0,
name TEXT,
statefp TEXT,
state TEXT
);
SELECT AddGeometryColumn( 'Counties', 'geo', SRID_PARAMETER, 'MULTIPOLYGON', 'XY' );
SELECT CreateSpatialIndex( 'Counties' , 'geo' );
CREATE INDEX IF NOT EXISTS "IDX_COUNTIES_COUNTY" ON "Counties" ("county");