Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone know of scripts for merging TIGER/Line shp files? It is for extracting the road features only, but for the whole of USA.

They are provided as shp files for one county at a time here: http://www.census.gov/geo/www/tiger/

If anyone sells the data, a link is also appreciated.

share|improve this question

2 Answers 2

There are tools for uploading tiger data to PostGIS. It might be a little easier to work with once it's in PostGIS. Here are some links:

http://pylab.blogspot.com/2007/02/import-tiger-database-to-postgis.html http://geoserver.org/display/GEOSDOC/Loading+TIGER+polygons+tigerpoly.pl

Here's a ruby script for parsing Tiger data:

http://wiki.openstreetmap.org/wiki/TIGER

Edit:

So, you want a shape file for all the roads in the U.S. I believe that would be a fairly large shp file. Does it have to be from Tiger? You can get the major highways in the U.S. from here.

It looks like MapWindow should allow you to merge shp files. I believe QuantumGIS does also.

Finally, here is a free tool whose only purpose is to merge shp files. This looks perfect for what you want.

share|improve this answer
    
That looks like a real detour, if I want SHP files and don't have/use postgis or ruby. –  Uffe Kousgaard Sep 6 '10 at 15:32
    
Agree, all of US is too much. 3-4 parts would be needed or the 2 GB limit is broken. The "major highways" misses too many details - I know the dataset already. –  Uffe Kousgaard Sep 7 '10 at 7:33

The ogr2ogr utility of OGR will do the trick, here's an example adapted from the FAQ:

# loop through all of the shapefiles in the directory and load them
for i in $(ls *.shp); do
  ogr2ogr -f 'ESRI Shapefile' -a_srs "EPSG:4269" -nln merged_tiger_roads $i -update -append -skipfailures
done 

This should produce a single merged_tiger_roads.shp from the collection of shapefiles. The FAQ has additional examples of batch merging if you need a more complex workflow.

share|improve this answer
    
Thanks, will look into this. If I remember correctly, roads are only a subset of the line-layers in TIGER, so a selection would be needed. There are also far too many non-relevant fields in the DBF, so a selection here would be needed too. –  Uffe Kousgaard Sep 7 '10 at 7:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.