Add custom javascript snippets to calculate tags

This commit is contained in:
Pieter Vander Vennet 2021-03-24 01:25:57 +01:00
parent 3e130ebe80
commit f124d9ded7
17 changed files with 799 additions and 14649 deletions

View file

@ -21,6 +21,15 @@ export class GeoOperations {
return coordinates;
}
/**
* Returns the distance between the two points in kilometers
* @param lonlat0
* @param lonlat1
*/
static distanceBetween(lonlat0: [number,number], lonlat1:[number, number]){
return turf.distance(lonlat0, lonlat1)
}
static featureIsContainedInAny(feature: any,
shouldNotContain: any[],
maxOverlapPercentage: number): boolean {