import { Feature, Point } from 'geojson'; import { AllGeoJSON } from '@turf/helpers'; /** * Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature. * * * Given a {@link Polygon}, the point will be in the area of the polygon * * Given a {@link LineString}, the point will be along the string * * Given a {@link Point}, the point will the same as the input * * @function * @param {GeoJSON} geojson any Feature or FeatureCollection * @returns {Feature} a point on the surface of `input` * @example * var polygon = turf.polygon([[ * [116, -36], * [131, -32], * [146, -43], * [155, -25], * [133, -9], * [111, -22], * [116, -36] * ]]); * * var pointOnPolygon = turf.pointOnFeature(polygon); * * //addToMap * var addToMap = [polygon, pointOnPolygon]; */ declare function pointOnFeature(geojson: AllGeoJSON): Feature; export { pointOnFeature as default, pointOnFeature };