Re: Radius of a zip code

From: Randolf Richardson <rr(at)8x(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Radius of a zip code
Date: 2004-01-01 04:56:24
Message-ID: Xns9462D2D4F5738rr8xca@200.46.204.72
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)" wrote in comp.databases.postgresql.sql:

[sNip]
> I'm guessing that the big problem is that you didn't measure longitude
> and latitude in identical units in your table, so your "circle" isn't
> real circular, and the smaller problem is that "miles" converts to
> "degrees of arc" differently at different latitudes.

Don't forget that there are two different types of "miles" which need
to be considered when measuring distances:

1 statute/land mile = 1.609 km
1 nautical/sea mile = 1.85 km

Since kilometers are consistent over land and water (and in the great
vacuum of space), the metric system should always be used to ensure clarity,
unless the only land masses the user is concerned with have no bodies of
water.

=)

--
Sir Randolf, noble spam fighter - rr(at)8x(dot)ca
Vancouver, British Columbia, Canada

Please do not eMail me directly when responding
to my postings in the newsgroups.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dinesh Pandey 2004-01-01 09:43:48 Re: [SQL] index row size 2728 exceeds btree maximum, 2713
Previous Message Randolf Richardson 2004-01-01 04:48:37 Re: not in vs not exists - vastly diferent performance