1

I have created Geocode for some area and I couldn't find accurate Geocode's for few address. so I want to find the nearest POI for non accurated locations using accurated geocodes as referece in QGIS. I dont have any Road network also. Without road network i wanted to find it spatially.

How do i do that?

  • PostGIS provides solution see: bostongis.com/… – Zoltan May 11 '16 at 7:19
  • can you add information about your dataset? – Shahzad Bacha May 11 '16 at 7:49
  • Its about address of some town in india. @ShahzadBacha – Bunny Chowdary May 11 '16 at 9:24
  • When i tried with PostGIS its giving random results for multiple records. Suggest me some solution using Postgre SQL. @Zoltan – Bunny Chowdary May 11 '16 at 9:27
  • By info what i mean is, do you have the geocoded points and non geocoded points in a single layer? @Chowdary – Shahzad Bacha May 11 '16 at 10:13
1

For a naive approach you can use this SQL select:

SELECT v.nev, f.nev, ST_Distance(v.geom, f.geom)
FROM varos AS v CROSS JOIN folyo AS f
WHERE (v.nev, 
ST_Distance(v.geom, f.geom)) in (
SELECT varos.nev, min(ST_Distance(varos.geom, folyo.geom)) 
FROM varos CROSS JOIN folyo
WHERE varos.nev = v.nev
GROUP BY varos.nev);

This Query selects the nearest city and river pairs (city = varos, river = folyo). You can speed up your query using <-> or <#> operator.

  • Does it gives street level locations or premise level location? @Zoltan – Bunny Chowdary May 12 '16 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.