Fix length, update docs
This commit is contained in:
parent
62f0ae42e0
commit
c0fb852d41
2 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,10 @@ The latitude and longitude of the point (or centerpoint in the case of a way/are
|
|||
|
||||
The surface area of the feature, in square meters and in hectare. Not set on points and ways
|
||||
|
||||
### \_length, \_length:km
|
||||
|
||||
The total length of a feature in meters (and in kilometers, rounded to one decimal for '\_length:km'). For a surface, the length of the perimeter
|
||||
|
||||
### \_country
|
||||
|
||||
The country code of the property (with latlon2country)
|
||||
|
|
|
@ -15,7 +15,8 @@ export class GeoOperations {
|
|||
return newFeature;
|
||||
}
|
||||
|
||||
static centerpointCoordinates(feature: any){
|
||||
static centerpointCoordinates(feature: any): [number, number]{
|
||||
// @ts-ignore
|
||||
return turf.center(feature).geometry.coordinates;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue