Accurate Distance Measure

Peruttu Julkaistu Jun 3, 2015 Maksettu toimituksen yhteydessä
Peruttu Maksettu toimituksen yhteydessä

I am looking for someone who can write a javascript function that will mimic the calculations used by SQL Server 2012 with their STLength and STDistance functions in order to match up length of polylines.

As an example this SQL statement:

SELECT geography::STGeomFromText('LINESTRING([url removed, login to view] 39.63,2.98 27.52)', 4326).STLength()

Returns a distance/length of 9030715.95721209

You are to be atleast 13 significant figures of the numbers that SQL server reports.

Your function should take in 4 integers corresponding to a pair of longitude and latitude coordinates and return a distance. Not only should your distance be exact to the distance above, but also for all distances between GPS points should equal the distance that SQL Server 2012 returns.

The solution must be in javascript only and not rely on SQL server in anyway.

I will provide more data points and their distances in the next day or so.

I will not pay an upfront fee. I will instead fund 1 milestone that will be paid when code is provided that accomplishes the requirements mentioned above.

Here are more points to use as a metric. Must get the same distance on all points.

SELECT geography::STGeomFromText('LINESTRING(-84.428805783391 42.08434080903442,-84.42870184779167 42.08437265903728)', 4326).STLength()
9.29900367582486 meters

SELECT geography::STGeomFromText('LINESTRING(-84.428805783391 42.08434080903442,-84.42799374461174 42.08607661087991)', 4326).STLength()
204.1755835414 meters

SELECT geography::STGeomFromText('LINESTRING(-38.3642578125 39.9434364619742,-36.73828125 40.48038142908172)', 4326).STLength()
150709.583739883 meters


SELECT geography::STGeomFromText('LINESTRING(-104.765625 81.62135170283737,65.0390625 -23.563987128451217)', 4326).STLength()
13528866.3765678 meters

SELECT geography::STGeomFromText('LINESTRING(-108.45703125 37.92686760148135,-105.556640625 39.0959629363055)', 4326).STLength()
284295.037861469 meters The linestring is in a format known as WKT if you are unsure which is longitude and latitude

JavaScript

Projektin tunnus: #7789885

Tietoa projektista

5 ehdotusta Etäprojekti Aktiivinen Jun 13, 2015

5 freelanceria on tarjonnut keskimäärin $37 tähän työhön

smartkid78

Hi There.. I am ready to work on this project. As per your requirement I can complete the project. I have a large amount of experience in latest technology web development. is that distance from direct map or somethin Lisää

$55 USD 2 päivässä
(6 arvostelua)
3.5
ig3

Hi. I've created a script, that calculates distance. As I understand, you want it to match SQL Server's numbers. So, please take a look on my results compared to your samples: Sample 1: 9.29900367582486 My code: Lisää

$21 USD 0 päivässä
(4 arvostelua)
1.1