Home > Archive > PostgreSQL Discussion > January 2006 > Suggestions on storing and retrieving geocode data









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Suggestions on storing and retrieving geocode data
George Woodring

2006-01-26, 4:57 pm

I am looking for suggestions on storing and retrieving geocode
information.

My application currently stores 2 columns (lat, long) as numeric and I
have a btree index on them. This works fine for the current set of
data, but as it expands I know it will become an issue.

I am looking at changing the index to an rtree, but I did not know if it
is better to create a point column or if I could use the existing
lat/long columns.

The query will always be to select points inside a box.

Thanks in advance,
Woody

----------------------------------------
iGLASS Networks
211-A S. Salem St
Apex NC 27502
(919) 387-3550 x813
www.iglass.net

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Michael Fuhr

2006-01-26, 4:57 pm

On Thu, Jan 26, 2006 at 12:55:46PM -0500, George Woodring wrote:
> I am looking for suggestions on storing and retrieving geocode
> information.


Consider using PostGIS:

http://www.postgis.org/

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Bruno Wolff III

2006-01-27, 3:23 am

On Thu, Jan 26, 2006 at 12:55:46 -0500,
George Woodring <george.woodring@iglass.net> wrote:
> I am looking for suggestions on storing and retrieving geocode
> information.
>
> My application currently stores 2 columns (lat, long) as numeric and I
> have a btree index on them. This works fine for the current set of
> data, but as it expands I know it will become an issue.
>
> I am looking at changing the index to an rtree, but I did not know if it
> is better to create a point column or if I could use the existing
> lat/long columns.
>
> The query will always be to select points inside a box.


If you don't want to use PostGIS, you could also use contrib/earthdistance.
The 'earth' domain uses the cube data type to represent points on the
surface of the earth (modelled as a perfect sphere). There is a GIST index
available for cube, so searches should be reasonably fast.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com