Skip to content

Geometry length mismatched between Java/Javascript #16

Description

@DenisCarriere

Geometry length mismatched between Java/Javascript

Geometry length calculations are mismatched (~35cm off between Javascript/Java implementation), currently using Haversine Formula for the length of the geometry. I could calculate the length using the rhumb distance, maybe it will match.

Used this geometry to calculate the ~35cm offset between both libraries.

const line = [[-74.006449, 40.739405000000005], [-74.00790070000001, 40.7393884], [-74.00805100000001, 40.7393804]];

sharedstreets.distanceToNextRef(line) //=> 13501
// => Java Implementation => 13536

To-Do

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions