Unix Technical Forum

table of US states' neighbours

This is a discussion on table of US states' neighbours within the Pgsql General forums, part of the PostgreSQL category; --> I'd like to add a table, state_neighbours, which joins each state with all of its neighbour states. Does anyone ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:23 AM
brian
 
Posts: n/a
Default table of US states' neighbours

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.

eg. IA would be associated with {MN,WS,IL,MO,KS,NB,SD} and HI & AK would
not be represented.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:23 AM
Colin Wetherbee
 
Posts: n/a
Default Re: table of US states' neighbours

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.

> eg. IA would be associated with {MN,WS,IL,MO,KS,NB,SD} and HI & AK would
> not be represented.


I think you mean {MN, WI, IL, MO, NE, SD}.

Colin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 12:23 AM
brian
 
Posts: n/a
Default Re: table of US states' neighbours

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.


I won't argue that but if there's a list available somewhere that would
be easier.

>> eg. IA would be associated with {MN,WS,IL,MO,KS,NB,SD} and HI & AK
>> would not be represented.

>
> I think you mean {MN, WI, IL, MO, NE, SD}.
>


Hence the reason I wondered if someone already had this compiled. ;-)

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 12:23 AM
Erik Jones
 
Posts: n/a
Default Re: table of US states' neighbours


On Mar 27, 2008, at 5:00 PM, 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.
>
>> eg. IA would be associated with {MN,WS,IL,MO,KS,NB,SD} and HI & AK
>> would not be represented.

>
> I think you mean {MN, WI, IL, MO, NE, SD}.


Sounds like your 2% there!

Erik Jones

DBA | EmmaŽ
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 12:23 AM
Michael Fuhr
 
Posts: n/a
Default Re: table of US states' neighbours

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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 12:23 AM
brian
 
Posts: n/a
Default Re: table of US states' neighbours

Michael Fuhr wrote:
> 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.



Brilliant, thanks. Yes the PostGIS angle is why i asked on this list. I
figured that this info must be readily available. Now google will pick
it up for the next bloke.


> 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}
>


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-10-2008, 12:23 AM
Richard Broersma
 
Posts: n/a
Default Re: table of US states' neighbours

On Thu, Mar 27, 2008 at 11:33 PM, Michael Fuhr <mike@fuhr.org> wrote:
> On Thu, Mar 27, 2008 at 06:00:57PM -0400, Colin Wetherbee wrote:
> > brian wrote:

> 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}


Where is Hawaii and Alaska? )


--
Regards,
Richard Broersma Jr.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-10-2008, 12:23 AM
Colin Wetherbee
 
Posts: n/a
Default Re: table of US states' neighbours

Richard Broersma wrote:
> On Thu, Mar 27, 2008 at 11:33 PM, Michael Fuhr <mike@fuhr.org> wrote:
>> 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}

>
> Where is Hawaii and Alaska? )


The OP said he didn't want HI and AK in the list since they don't
touch other states.

Colin


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com