import { BaseGeometry, GeometryFlavour, GeometryType, LinearRing, LineString, MultiLineString, MultiPoint, Point, IdDef, SrDef } from '../..'; import { EsriPolygon } from '../../../esri'; import { default as GeoJson } from 'geojson'; export declare class Polygon extends BaseGeometry { protected rawArray: Array>>; /** * Constructs a LinearRing from the given source of a line. Will close the line if it's not already closed * * @param {String | Integer} id An identifier for the LineString * @param {Array | Polygon | MultiLineString | LineString | MultiPoint} geometry A geometry that equates to a line or set of lines, or an array of things that equate to a set of lines. Each array element must be parseable as a line. * @param {SpatialReference | number | string} [sr] A spatial reference for the geometry. Defaults to Lat/Long if not provided * @param {Boolean} [raw] An efficiency flag. If set, it means the verticies is in the pure format of [[[number, number],...,[samenumber, samenumber]],...] and we can skip data validations and parsing. */ constructor(id: IdDef, polygon: Polygon); constructor(id: IdDef, multiLine: MultiLineString); constructor(id: IdDef, linearRing: LinearRing); constructor(id: IdDef, line: LineString); constructor(id: IdDef, multiPoint: MultiPoint); constructor(id: IdDef, listOfListOfCoords: Array>>, sr?: SrDef, raw?: boolean); constructor(id: IdDef, listOfListOfPoints: Array>, sr?: SrDef); constructor(id: IdDef, listOfListOfXY: Array>, sr?: SrDef); constructor(id: IdDef, listOfLinearRings: Array, sr?: SrDef); constructor(id: IdDef, listOfLines: Array, sr?: SrDef); constructor(id: IdDef, listOfMultiPoints: Array, sr?: SrDef); constructor(id: IdDef, listOfMixedFormats: Array, sr?: SrDef); addLinearRings(linearRings: Array): void; /** Returns an array of the contained rings. A new array is returned each time this is called. */ get ringArray(): Array; get type(): GeometryType; get flavour(): GeometryFlavour; /** * Returns an array of ring arrays (e.g. [[[x1, y1], [x2, y2], [x3, y3], [x1, y1]], []] ) */ toArray(): Array>>; static parsePolygon(input: any): Array>>; static arrayDeepCopy(a: Array>>): Array>>; static fromESRI(esriPoly: EsriPolygon, id?: number | string): Polygon; toESRI(): EsriPolygon; static fromGeoJSON(geoJsonPoly: GeoJson.Polygon, id?: number | string): Polygon; toGeoJSON(): GeoJson.Polygon; }