Re: [PHP] Finding an Address

[email protected] (Serge Fonville)
Newsgroups php.general
Message-ID <CAOAS_+KBaLcVkwDVGPx2AtqbCg-a0j0=hyG=A6=ofTbnwrjj-A@mail.gmail.com>
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 <[email protected]>

> 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 <[email protected]>
> 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 <[email protected]>
> >
> >
> >
> > On Feb 28, 2013, at 1:04 PM, [email protected] 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
> >
> >
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.