Re: [PHP] Finding an Address

2013-03-01 Thread Tedd Sperling
On Feb 28, 2013, at 12:36 PM, Floyd Resler fres...@adex-intl.com wrote:

 I have a project where my client would like to find the nearest street 
 address from where he current is.  Getting the longitude and latitude is easy 
 enough but I'm having a hard time finding out how to get the nearest house.  
 I have found a lot of solutions for addresses maintained in a database but 
 these addresses won't be in a database.  I thought about just querying Google 
 for each longitude and latitude within in a small circle but my math skills 
 are nowhere near good enough to accomplish that.  Anyone have any ideas?
 
 Thanks!
 Floyd

What about using zip codes?

Like so:

http://php1.net/a/zipcode/

Cheers,

tedd


_
t...@sperling.com
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding an Address

2013-02-28 Thread kenrbnsn

On 28.02.2013 12:36, Floyd Resler wrote:

I have a project where my client would like to find the nearest
street address from where he current is.  Getting the longitude and
latitude is easy enough but I'm having a hard time finding out how to
get the nearest house.  I have found a lot of solutions for addresses
maintained in a database but these addresses won't be in a database.
I thought about just querying Google for each longitude and latitude
within in a small circle but my math skills are nowhere near good
enough to accomplish that.  Anyone have any ideas?

Thanks!
Floyd



Have you tried Google Maps reverse geocoding? 
https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding


Ken

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding an Address

2013-02-28 Thread Floyd Resler



On Feb 28, 2013, at 1:04 PM, kenrb...@rbnsn.com wrote:

 On 28.02.2013 12:36, Floyd Resler wrote:
 I have a project where my client would like to find the nearest
 street address from where he current is.  Getting the longitude and
 latitude is easy enough but I'm having a hard time finding out how to
 get the nearest house.  I have found a lot of solutions for addresses
 maintained in a database but these addresses won't be in a database.
 I thought about just querying Google for each longitude and latitude
 within in a small circle but my math skills are nowhere near good
 enough to accomplish that.  Anyone have any ideas?
 
 Thanks!
 Floyd
 
 
 Have you tried Google Maps reverse geocoding? 
 https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
 
 Ken
 
That's what I'm doing but I need to find the closest say five houses to the 
current latitude and longitude coordinates.

Thanks!
Floyd



Re: [PHP] Finding an Address

2013-02-28 Thread Serge Fonville
HI,

It seems like you want something according to the following

you know your start long/lat
you can determine the long/lat arround it
for every of those you determine the route.
if you follow that route you know the house you find
otherwise you can use an increasing circle and if it finds an address on
the location, you may be able to determine which of the points in the
circles (which increase in size) is closest.

Does that match what you want?
If not, could you further elaborate what you want exactly?

Kind regards/met vriendelijke groet,

Serge Fonville

http://www.sergefonville.nl

Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table


2013/2/28 Floyd Resler fres...@adex-intl.com




 On Feb 28, 2013, at 1:04 PM, kenrb...@rbnsn.com wrote:

  On 28.02.2013 12:36, Floyd Resler wrote:
  I have a project where my client would like to find the nearest
  street address from where he current is.  Getting the longitude and
  latitude is easy enough but I'm having a hard time finding out how to
  get the nearest house.  I have found a lot of solutions for addresses
  maintained in a database but these addresses won't be in a database.
  I thought about just querying Google for each longitude and latitude
  within in a small circle but my math skills are nowhere near good
  enough to accomplish that.  Anyone have any ideas?
 
  Thanks!
  Floyd
 
 
  Have you tried Google Maps reverse geocoding?
 https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
 
  Ken
 
 That's what I'm doing but I need to find the closest say five houses to
 the current latitude and longitude coordinates.

 Thanks!
 Floyd




Re: [PHP] Finding an Address

2013-02-28 Thread Floyd Resler
Serge,
That is precisely what I want!  Any ideas on how to accomplish that?

Thanks!
Floyd


On Feb 28, 2013, at 2:52 PM, Serge Fonville serge.fonvi...@gmail.com wrote:

 HI,
 
 It seems like you want something according to the following
 
 you know your start long/lat
 you can determine the long/lat arround it
 for every of those you determine the route.
 if you follow that route you know the house you find
 otherwise you can use an increasing circle and if it finds an address on the 
 location, you may be able to determine which of the points in the circles 
 (which increase in size) is closest.
 
 Does that match what you want?
 If not, could you further elaborate what you want exactly?
 
 Kind regards/met vriendelijke groet,
 
 Serge Fonville
 
 http://www.sergefonville.nl
 
 Convince Microsoft!
 They need to add TRUNCATE PARTITION in SQL Server
 https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table
 
 
 2013/2/28 Floyd Resler fres...@adex-intl.com
 
 
 
 On Feb 28, 2013, at 1:04 PM, kenrb...@rbnsn.com wrote:
 
  On 28.02.2013 12:36, Floyd Resler wrote:
  I have a project where my client would like to find the nearest
  street address from where he current is.  Getting the longitude and
  latitude is easy enough but I'm having a hard time finding out how to
  get the nearest house.  I have found a lot of solutions for addresses
  maintained in a database but these addresses won't be in a database.
  I thought about just querying Google for each longitude and latitude
  within in a small circle but my math skills are nowhere near good
  enough to accomplish that.  Anyone have any ideas?
 
  Thanks!
  Floyd
 
 
  Have you tried Google Maps reverse geocoding? 
  https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
 
  Ken
 
 That's what I'm doing but I need to find the closest say five houses to the 
 current latitude and longitude coordinates.
 
 Thanks!
 Floyd
 
 



Re: [PHP] Finding an Address

2013-02-28 Thread Serge Fonville
well, not exactly.
But I can help you (so can others) to go through code flow (it will
probably be tedious)

you have a position you start and a certain distance from that point (in a
circle)
From thereon you substract start(x,y) from dest(x,y) by substracting x from
x and y from y the diffence is the amount of degrees between the two points
are apart, if you add instead you determine a point.

so for example you are currently at long: 75, lat: 31 and you want to know
some point 6.9 miles away.
you start by adding 0 to 75 and 0.1 to 31 you then have one point (both are
degrees and one degree is roughly 69 miles) you can also do the opposite,
add 0.1 to 75 and 0 to 31, you can also add 0.05 to both (again totaling
0.1), mind though the values that total 0.1 are absolute, even though the
long/lat may be negative.

The point is that the values added are combined the distance you want to
measure against.
From thereon you can determine if there is an address at the location
(using reverse geo-coding).
when increasing the number you add, you measure further and further
you'll have to do that all arround the point you started from

more information about how long/lat works:
http://www.nationalatlas.gov/articles/mapping/a_latlong.html

HTH

Kind regards/met vriendelijke groet,

Serge Fonville

http://www.sergefonville.nl

Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table


2013/2/28 Floyd Resler fres...@adex-intl.com

 Serge,
 That is precisely what I want!  Any ideas on how to accomplish
 that?

 Thanks!
 Floyd


 On Feb 28, 2013, at 2:52 PM, Serge Fonville serge.fonvi...@gmail.com
 wrote:

  HI,
 
  It seems like you want something according to the following
 
  you know your start long/lat
  you can determine the long/lat arround it
  for every of those you determine the route.
  if you follow that route you know the house you find
  otherwise you can use an increasing circle and if it finds an address on
 the location, you may be able to determine which of the points in the
 circles (which increase in size) is closest.
 
  Does that match what you want?
  If not, could you further elaborate what you want exactly?
 
  Kind regards/met vriendelijke groet,
 
  Serge Fonville
 
  http://www.sergefonville.nl
 
  Convince Microsoft!
  They need to add TRUNCATE PARTITION in SQL Server
 
 https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table
 
 
  2013/2/28 Floyd Resler fres...@adex-intl.com
 
 
 
  On Feb 28, 2013, at 1:04 PM, kenrb...@rbnsn.com wrote:
 
   On 28.02.2013 12:36, Floyd Resler wrote:
   I have a project where my client would like to find the nearest
   street address from where he current is.  Getting the longitude and
   latitude is easy enough but I'm having a hard time finding out how to
   get the nearest house.  I have found a lot of solutions for addresses
   maintained in a database but these addresses won't be in a database.
   I thought about just querying Google for each longitude and latitude
   within in a small circle but my math skills are nowhere near good
   enough to accomplish that.  Anyone have any ideas?
  
   Thanks!
   Floyd
  
  
   Have you tried Google Maps reverse geocoding?
 https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
  
   Ken
  
  That's what I'm doing but I need to find the closest say five houses to
 the current latitude and longitude coordinates.
 
  Thanks!
  Floyd
 
 




Re: [PHP] Finding an Address

2013-02-28 Thread Sean Greenslade
On Thu, Feb 28, 2013 at 3:18 PM, Serge Fonville serge.fonvi...@gmail.comwrote:

 well, not exactly.
 But I can help you (so can others) to go through code flow (it will
 probably be tedious)

 you have a position you start and a certain distance from that point (in a
 circle)
 From thereon you substract start(x,y) from dest(x,y) by substracting x from
 x and y from y the diffence is the amount of degrees between the two points
 are apart, if you add instead you determine a point.

 so for example you are currently at long: 75, lat: 31 and you want to know
 some point 6.9 miles away.
 you start by adding 0 to 75 and 0.1 to 31 you then have one point (both are
 degrees and one degree is roughly 69 miles) you can also do the opposite,
 add 0.1 to 75 and 0 to 31, you can also add 0.05 to both (again totaling
 0.1), mind though the values that total 0.1 are absolute, even though the
 long/lat may be negative.

 The point is that the values added are combined the distance you want to
 measure against.
 From thereon you can determine if there is an address at the location
 (using reverse geo-coding).
 when increasing the number you add, you measure further and further
 you'll have to do that all arround the point you started from

 more information about how long/lat works:
 http://www.nationalatlas.gov/articles/mapping/a_latlong.html

 HTH

 Kind regards/met vriendelijke groet,

 Serge Fonville

 http://www.sergefonville.nl

 Convince Microsoft!
 They need to add TRUNCATE PARTITION in SQL Server

 https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table

 snip /


You should be careful of statements like one degree is roughly 69 miles.
While this is true for latitude, it is only true for longitude at the
equator. To get the distance between two sets of latlon coordinates, you
need to use the great circle equation:

http://www.movable-type.co.uk/scripts/latlong.html


-- 
--Zootboy

Sent from some sort of computing device.


Re: [PHP] Finding an Address

2013-02-28 Thread Serge Fonville
You are right, there is more to it.

The incentive from me was to not further complicate a problem that by
itself can be very hard to solve.
but still, a more accurate measure van only determined by including these
concepts.

Kind regards/met vriendelijke groet,

Serge Fonville

http://www.sergefonville.nl

Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table


2013/2/28 Sean Greenslade zootboys...@gmail.com



 On Thu, Feb 28, 2013 at 3:18 PM, Serge Fonville 
 serge.fonvi...@gmail.comwrote:

 well, not exactly.
 But I can help you (so can others) to go through code flow (it will
 probably be tedious)

 you have a position you start and a certain distance from that point (in a
 circle)
 From thereon you substract start(x,y) from dest(x,y) by substracting x
 from
 x and y from y the diffence is the amount of degrees between the two
 points
 are apart, if you add instead you determine a point.

 so for example you are currently at long: 75, lat: 31 and you want to know
 some point 6.9 miles away.
 you start by adding 0 to 75 and 0.1 to 31 you then have one point (both
 are
 degrees and one degree is roughly 69 miles) you can also do the opposite,
 add 0.1 to 75 and 0 to 31, you can also add 0.05 to both (again totaling
 0.1), mind though the values that total 0.1 are absolute, even though the
 long/lat may be negative.

 The point is that the values added are combined the distance you want to
 measure against.
 From thereon you can determine if there is an address at the location
 (using reverse geo-coding).
 when increasing the number you add, you measure further and further
 you'll have to do that all arround the point you started from

 more information about how long/lat works:
 http://www.nationalatlas.gov/articles/mapping/a_latlong.html

 HTH

 Kind regards/met vriendelijke groet,

 Serge Fonville

 http://www.sergefonville.nl

 Convince Microsoft!
 They need to add TRUNCATE PARTITION in SQL Server

 https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table

 snip /


 You should be careful of statements like one degree is roughly 69 miles.
 While this is true for latitude, it is only true for longitude at the
 equator. To get the distance between two sets of latlon coordinates, you
 need to use the great circle equation:

 http://www.movable-type.co.uk/scripts/latlong.html


 --
 --Zootboy

 Sent from some sort of computing device.