[postgis-users] Newbie questions on what geometry to use
snacktime at gmail.com
Mon Jul 3 19:25:39 PDT 2006
I need a geometry to store latitude/longitude of street addresses. I
will be using the points to do queries against the google map api.
I'm a bit confused about what SRID to use and want to make sure I'm
choosing the right geometry.
This is what I'm using now to define the table and geometry column:
CREATE TABLE addresses_geom ( id int4, address varchar(25) );
SELECT AddGeometryColumn( 'addresses_geom', 'geom', 4326, 'POINT', 2);
Does that look correct? It seems to work, but I have yet to create
the real queries I will need. Which brings up another question. I need
a query or set of calculations to get all the points within an X mile
radius. I haven't been able to really find any concrete examples on
how to go about this. I could query all the points in the database
using distance_sphere. The database has just under a million points,
and the search could be narrowed by only searching within a state.
Any guesses on how efficient that type of query would be?
More information about the postgis-users