[Mapserver-west] map data question

Aaron Racicot aaronr at ecotrust.org
Tue Jun 28 20:15:19 EDT 2005


Jeramie,
You can download the 2004 TIGER data for California and extract the
complete chain data from that.  If you use the CFCC code to filter what
data is displayed (or better yet filter just that data when extracting
it to a shapefile) you can just get the major roads.

Here is some info:

1) Tiger data to download:
http://www.census.gov/geo/www/tiger/tiger2004fe/tgr2004fe.html

2) A PHP script I use to extract the county zip files out into their own
directory and then convert to shapefiles.  It calls ogr2ogr, so make
sure that you have access to that utility (send me mail if you don't
have it or know what it is):
http://pearl.ecotrust.org/cgi-bin/cvsweb.cgi/util/batch_processing/proce
ss_tiger.php
Call it like "php process_tiger.php" in the directory containing all of
the state directories (maybe just the CA directory in your case).

3) Create a tileindex on all of the shapefiles for the state that were
created:
In the directory that contains the california data execute
find . -name "CompleteChain.shp" -exec ogrtindex
CompleteChain_tindex.shp {} \;

4) Add it all to your mapfile:
Here is a section from a mapfile that used the extracted shapefiles to
display different road types at different scales:
++++++++++++++++++++++++++++++++++++++++++++++
  LAYER
    NAME "TIGER 2004fe Roads - Line"
    STATUS DEFAULT
    CONNECTIONTYPE OGR
    TILEINDEX "CompleteChain_tindex.shp,0"
    TYPE LINE
    UNITS METERS
    SIZEUNITS PIXELS
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    METADATA
    END
    PROJECTION
      "proj=latlong"
      "datum=NAD83"
    END
    CLASSITEM "CFCC"
    CLASS
      EXPRESSION /^A1/
      NAME "Interstate"
      MAXSCALE 400000
      STYLE
        SYMBOL 0
        COLOR 0 0 255
        SIZE 1
      END
    END
    CLASS
      EXPRESSION /^A[23]/
      NAME "Highway"
      MAXSCALE 200000
      STYLE
        SYMBOL 0
        COLOR 0 255 0
        SIZE 1
      END
    END
    CLASS
      EXPRESSION /^A[45]/
      NAME "City"
      MAXSCALE 100000
      STYLE
        SYMBOL 0
        COLOR 255 0 0
        SIZE 1
      END
    END
    CLASS
      EXPRESSION /^A[67]/
      NAME "Other"
      MAXSCALE 50000
      STYLE
        SYMBOL 0
        COLOR 20 55 90
        SIZE 1
      END
    END
  END
+++++++++++++++++++++++++++++++++

You can create similar layers as annotation layers to put the labels on
the streets.  Let me know if you need help with that as well.

Hope this helps...

Aaron


+----------------------------------------+
| Aaron Racicot  | aaronr at ecotrust.org   |
| GIS Programmer | 503.467.0759          |
+----------------------------------------+
| e c o t r u s t                        |
| Jean Vollum Natural Capital Center     |
| 721 NW Ninth Avenue                    |
| Suite 200                              |
| Portland, OR 97209                     |
| www.ecotrust.org                       |
+----------------------------------------+
-----Original Message-----
From: mapserver-west-bounces at lists.maptools.org
[mailto:mapserver-west-bounces at lists.maptools.org] On Behalf Of Jeramie
Gatchell
Sent: Tuesday, June 28, 2005 4:45 PM
To: mapserver-west at lists.maptools.org
Subject: [Mapserver-west] map data question


Does anyone know of a source for California MAJOR road data?  Not the
little roads, just the major 2+ lane type streets or a way to control
which streets show up on the mapserver map?  Preferably something that
is relatively new, most of the stuff I've found is from 1999 =[
 
Any help would be awesome, thanks a lot everyone.
 
Jeramie



More information about the Mapserver-west mailing list