Update documentation and allow code to be run while caching

This commit is contained in:
Pieter Vander Vennet 2021-07-23 17:18:30 +02:00
parent e121099562
commit 45631a921f
2 changed files with 5 additions and 2 deletions

View file

@ -6,11 +6,14 @@ export class GeoOperations {
return turf.area(feature);
}
/**
* Converts a GeoJSon feature to a point feature
* @param feature
*/
static centerpoint(feature: any) {
const newFeature = turf.center(feature);
newFeature.properties = feature.properties;
newFeature.id = feature.id;
return newFeature;
}