[postgis-users] Need an answer for somebody new to GIS and PostGIS

Brent Wood pcreso at pcreso.com
Sat Feb 3 12:20:42 PST 2007


--- Brian Harbick <brhar at mac.com> wrote:

> I have a data set of 1 million rows of addresses that have lat/long.  
> I do not know the source of the geocoding.
> 
> I need to be able to query the database for addresses within 10 miles  
> of a point.

We really need more info about your query & data to identify the problem, but
as a quick guess, you are either not converting your units into appropriate map
units, or are not using the appropriate distance function & projection.

Also let us know the level of precision required, whether spherical distance is
adequate or you want spheroidal, etc.

I've done similar queries in PostGIS on tables with up to 200 million records, 

so it can probably be done effectively.


Cheers,

  Brent Wood



> I have compared my attempts with results with results from Google API.
> 
> On one address, google said it was 8 miles away. PostGIS results said  
> 4 miles. Since, I live in the area that I tested 8 miles is most  
> likely the correct answer.
> 
> I have tried using SRID -1 and 4326 and both do not match with google.
> 
> I admit I have been hacking at this for two weeks and read hundreds  
> of posts in the forum, but have not found an answers that I can rely on.
> 
> I think that PostGIS is meant for point in polygon type queries,  
> which I will need next. but, right now I am just trying to make sure  
> I understand how to setup the geometry correctly to test for miles.
> 
> Please help point in the right direction with as much detail as  
> possible.
> 
> Thank You.
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 




More information about the postgis-users mailing list