On Thu, Mar 27, 2008 at 06:00:57PM -0400, Colin Wetherbee wrote: > brian wrote: >> I'd like to add a table, state_neighbours, which joins each state with all >> of its neighbour states. Does anyone know where I can find such a list? >> >> I'm not interested in "nearest neighbour", just any connected state. > > That sounds like something you could create in 20 minutes with a map. Or a few minutes with shapefiles and PostGIS, using the latter's spatial functions to identify geometries that touch. Below are the results of such an operation; I haven't verified the entire list but I did check a few and they were correct. AL|{FL,GA,MS,TN} AR|{LA,MO,MS,OK,TN,TX} AZ|{CA,CO,NM,NV,UT} CA|{AZ,NV,OR} CO|{AZ,KS,NE,NM,OK,UT,WY} CT|{MA,NY,RI} DC|{MD,VA} DE|{MD,NJ,PA} FL|{AL,GA} GA|{AL,FL,NC,SC,TN} IA|{IL,MN,MO,NE,SD,WI} ID|{MT,NV,OR,UT,WA,WY} IL|{IA,IN,KY,MI,MO,WI} IN|{IL,KY,MI,OH} KS|{CO,MO,NE,OK} KY|{IL,IN,MO,OH,TN,VA,WV} LA|{AR,MS,TX} MA|{CT,NH,NY,RI,VT} MD|{DC,DE,PA,VA,WV} ME|{NH} MI|{IL,IN,MN,OH,WI} MN|{IA,MI,ND,SD,WI} MO|{AR,IA,IL,KS,KY,NE,OK,TN} MS|{AL,AR,LA,TN} MT|{ID,ND,SD,WY} NC|{GA,SC,TN,VA} ND|{MN,MT,SD} NE|{CO,IA,KS,MO,SD,WY} NH|{MA,ME,VT} NJ|{DE,NY,PA} NM|{AZ,CO,OK,TX,UT} NV|{AZ,CA,ID,OR,UT} NY|{CT,MA,NJ,PA,VT} OH|{IN,KY,MI,PA,WV} OK|{AR,CO,KS,MO,NM,TX} OR|{CA,ID,NV,WA} PA|{DE,MD,NJ,NY,OH,WV} RI|{CT,MA} SC|{GA,NC} SD|{IA,MN,MT,ND,NE,WY} TN|{AL,AR,GA,KY,MO,MS,NC,VA} TX|{AR,LA,NM,OK} UT|{AZ,CO,ID,NM,NV,WY} VA|{DC,KY,MD,NC,TN,WV} VT|{MA,NH,NY} WA|{ID,OR} WI|{IA,IL,MI,MN} WV|{KY,MD,OH,PA,VA} WY|{CO,ID,MT,NE,SD,UT} -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general