[postgis-users] reverse geocoding

Stephen Woodbridge woodbri at swoodbridge.com
Mon Mar 29 21:58:36 PDT 2010


Richard Greenwood wrote:
> I'm not even sure if "reverse geocoding" is the correct term, but what
> I am trying to do is improve TIGER road centerline data from known
> points. I have a set a accurate address points, and I would like to
> assign fromleft, toleft, fromright, toright ranges to the TIGER
> centerlines from these points. I am just doing this for one small
> community, so I don't intend to turn it into a big programming
> project. i.e. I don't want to spend more time doing it programatically
> than it would take to do it "by hand". But if there is a tool or some
> code out there that would help, I sure would appreciate any pointers.
> 
> Thanks,
> Rich
> 

If you have a POINT then you can find the closest centerline within some 
RADIUS with:

select *, distance(POINT, the_geom) as dist
   from lines
  where expand(POINT, RADIUS) && the_geom
  order by dist limit 1;

-Steve



More information about the postgis-users mailing list