Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


Author Topic: Help on PostgreSQL/PostGIS query With TIGER data  (Read 3025 times)

masdangkolo

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Help on PostgreSQL/PostGIS query With TIGER data
« on: May 10, 2010, 08:57:07 PM »
The TIGER data contains not only shapefile sets (edges.dbf, edges.prj, edges.shp, edges.shp.xml, edges.shx), but also database only file sets (featnames.dbf, featnames.dbf.xml). If I understand this correctly the featnames.dbf contains identification information for records contained in edges.shp and they are associated by the TLID. I know how to load the edges.shp file into PostgreSQL/PostGIS (shp2pgsql, psql) and I think I can load the featnames.dbf (shp2pgsql, psql). Now how do I associate the TLID so that I can generate shapefiles that contain selected additional data from the featnames table.

Thanks

maps4gps

  • Expert Advisor
  • *****
  • Posts: 1524
  • Karma: 17
    • View Profile
Re: Help on PostgreSQL/PostGIS query With TIGER data
« Reply #1 on: May 11, 2010, 05:28:03 AM »
Features in the edges, etc. file have a name if there is one.  The data in the featnames file(s) contains this name and any additional name(s) for the edge/feature; i.e. multiple highway numbers, highway number - highway name - street name, other spelling(s) of street name, with/without direction, with/without st/lane, etc. 
Two years ago I counted 14 entries for one feature (a road/street).

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1577
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Help on PostgreSQL/PostGIS query With TIGER data
« Reply #2 on: May 11, 2010, 03:00:28 PM »
You can use a join SQL statement to make one table with all the data that you want; this will help you leave out things you don't need anymore.  If I had the column names I could write it for you but the idea is to do an insert with a select query and that select query has a join.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

 

anything