[Pharo-users] Is there any library to calculate the geographic distance between two points?

2016-10-05 Thread PAUL DEBRUICKER
I've got a few objects with latitude and longitude and want to be able to find the nearest from a collection Thanks Paul

Re: [Pharo-users] Is there any library to calculate the geographic distance between two points?

2016-10-05 Thread Paul DeBruicker
umm ... here is a good place to start http://forum.world.st/Geo-coordinates-operations-td4732373.html#a4732441 Paul DeBruicker wrote > I've got a few objects with latitude and longitude and want to be able to > find the nearest from a collection > > > Thanks > > Paul -- View this messag

Re: [Pharo-users] Is there any library to calculate the geographic distance between two points?

2016-10-05 Thread Sven Van Caekenberghe
Hi Paul, This is what we use (given WGS84 coordinates) T3GeoTools class>>#distanceBetween: firstPosition and: secondPosition "T3GeoTools distanceBetween: 5.33732@50.926 and: 5.49705@50.82733" | c | c := (firstPosition y degreeSin * secondPosition y degreeSin)

Re: [Pharo-users] Is there any library to calculate the geographic distance between two points?

2016-10-05 Thread Hernán Morales Durand
Hi Sven, Are you ok if I integrate your code into Territorial? I'd like to have 'Ottawa@CA' asTerritoiralCity distanceWGS84To: 'Rome@IT' asTerritorialCity Hernán 2016-10-05 19:00 GMT-03:00 Sven Van Caekenberghe : > Hi Paul, > > This is what we use (given WGS84 coordinates) > > T3GeoTools cla

Re: [Pharo-users] Is there any library to calculate the geographic distance between two points?

2016-10-05 Thread Sven Van Caekenberghe
> On 06 Oct 2016, at 00:07, Hernán Morales Durand > wrote: > > Hi Sven, > > Are you ok if I integrate your code into Territorial? Sure ! BTW, I got the basic code from http://www.movable-type.co.uk/scripts/latlong.html with the necessary adaptions. > I'd like to have > > 'Ottawa@CA' asT