[GENERAL] PostGIS: Approximating a house number from street address range

2011-10-12 Thread René Fournier
Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segment), which includes line segment direction and address ranges for both sides of the street. I'm now trying to figure out the best way to programmatically approximate the nearest h

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-12 Thread Andy Colson
On 10/12/2011 01:01 PM, René Fournier wrote: Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segment), which includes line segment direction and address ranges for both sides of the street. I'm now trying to figure out the best wa

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-12 Thread Andy Colson
On 10/12/2011 06:29 PM, Andy Colson wrote: On 10/12/2011 01:01 PM, René Fournier wrote: Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segment), which includes line segment direction and address ranges for both sides of the stree

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-12 Thread Andy Colson
On 10/12/2011 06:29 PM, Andy Colson wrote: On 10/12/2011 01:01 PM, René Fournier wrote: Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segment), which includes line segment direction and address ranges for both sides of the stree

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-12 Thread Andy Colson
On 10/12/2011 06:38 PM, Andy Colson wrote: On 10/12/2011 06:29 PM, Andy Colson wrote: On 10/12/2011 01:01 PM, René Fournier wrote: Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segment), which includes line segment direction an

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-13 Thread René Fournier
Thanks Andy for thinking about this for me. I tried using that function, but get this error: gc3=# SELECT gc3-# ST_AsText(the_geom) as street, strunamefr, l_adddirfg, l_hnumf, l_hnuml, l_stname_c, l_placenam, r_adddirfg, r_hnumf, r_hnuml, r_stname_c, r_placenam, gc3-# ST_Distance(ST_GeomFromText

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-14 Thread Andy Colson
On 2011-10-12, at 6:31 PM, Andy Colson wrote: On 10/12/2011 06:38 PM, Andy Colson wrote: On 10/12/2011 06:29 PM, Andy Colson wrote: On 10/12/2011 01:01 PM, René Fournier wrote: Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segm