Added by Brent Owens, last edited by timding on Nov 17, 2006  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

I wanted to work on the data-querying first, so we needed to [load the GNIS data].
The GNIS data is in PostGIS and the table looks like this:

Table "public.gnis"
    Column     |     Type     | Modifiers
---------------+--------------+-----------
 full_name     | text         |
 full_name_lc  | text         |
 sub_national  | text         |
 country_name  | text         |
 country_code  | character(2) |
 est_pop       | integer      |
 type          | text         |
 uniq_featcode | integer      |
 the_geom      | geometry     |
Indexes:
    "gnis_spatial_idx" gist (the_geom)
    "name_indx" btree (full_name_lc)

Note that the data is indexed on the full_name_lc column and there is a spatial index on the geometry. These are crutial for performance.
Here is an example row from the table:

full_name | full_name_lc |     sub_national      | country_name  | country_code | est_pop |      type       | uniq_featcode |                  the_geom
 ----------+--------------+-----------------------+---------------+--------------+---------+-----------------+---------------+--------------------------------------------
 Vancouver | vancouver    | British Columbia      | Canada        | CA           |         | Populated Place |       -575268 | 0101000000F0BD648888C85EC00000000000A04840

We have to configure GeoServer to find this data.
I won't repeat how to set up GeoServer here, but I will point you to the tutorials.

We call the layer 'gnis', and the namespace is 'topp' (The Open Planning project). The namespace is just a label before the data, usually signifying who is supplying the data. You can call it whatever you want, even "brent_rules".

>>Proceed onto the next step, Step 3: Set Up the Queries* >>