↧
Answer by Evan Carroll for How to deal with finding nearby locations when...
What you want is ST_DWithin. That will use an index.SELECT ascii_nameFROM geonameWHEREST_DWithin( ST_SetSRID(ST_MakePoint(-122.67621 45.52345), 4326), the_geom, 16093);You probably want to use...
View ArticleHow to deal with finding nearby locations when given a zip code or city?
I am using PostgreSQL and PostGIS for this. I have downloaded dumps from Geoname, and built my tables from allCountries, alternateNames, and countryInfo. I've created my PostGIS geometry column, and...
View Article