@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
18 lines (17 loc) • 1.01 kB
TypeScript
import { Extent } from 'ol/extent.js';
import Feature from 'ol/Feature.js';
export declare function formatCoordinates(coords: number[], locale: string): string[];
/**
* Will check if given coords can be mapped to a max extent
* if not, an empty array is returned
* @param coords [lat, lon], [lon, lat], [east, north] accepted
* @param extent bbox of 4 numbers, typically maxExtent defined in config
* @returns coords in provided srid if extent is given, otherwise, returns coords
*/
export declare function parseCoordinates(coords: number[], extent: number[] | undefined, srid: string): number[];
export declare function decimalToDMS(coordinate: number[]): string[];
export declare function printCoordinate(coordinate: [number, number], format: 'dms' | 'decimal', precision: number): string[];
/**
* Returns a bbox around the geometry that is x percent larger than the geometry.
*/
export declare function createBufferedExtentFromFeature(feature: Feature, percentageBuffer?: number): Extent | undefined;