import SpatialReference from '@arcgis/core/geometry/SpatialReference'; import Point from '@arcgis/core/geometry/Point'; import Extent from '@arcgis/core/geometry/Extent'; import TimeExtent from '@arcgis/core/time/TimeExtent'; declare namespace exports { export { createSpatialReference }; export { isValidSpatialReference }; export { equalSpatialReference }; export { createPoint }; export { createExtent }; export { createTimeExtent }; export { equalTimeExtent }; export { correctAspectRatio }; export { equal }; export { epsilonEqual as equalApproximate }; export { calcPixelResolutionAtScale }; export { calcMetricToGeodetic }; export { calcGeodeticToMetric }; export { isWebMercator }; export { isProjected }; export { isGeographic }; export { calcExtent }; export { isProjectionDecimal }; export { isProjectionDegree }; export { getProjectionFormat }; export { removeAdjacentPoints }; } /** * Function to create an instance of {SpatialReference} by some alternative arguments. * @param [params] an init object or an argument list, see the sample. * @returns {SpatialReference} a SpatialReference. * @example * // create empty reference * var crsEmpty = ct.mapping.geometry.createSpatialReference(); * * // use numbers as code * var crs4326 = ct.mapping.geometry.createSpatialReference(4326); * * // use string codes * var crs4326 = ct.mapping.geometry.createSpatialReference("4326"); * * // use wkt strings * var crsByWKT = ct.mapping.geometry.createSpatialReference("PROJCS[...]"); * * // use normal object constructor (one of wkid or wkt must be specified) * var crs4326 = ct.mapping.geometry.createSpatialReference({ * wkid: '4326', * wkt: 'PROJCS[...]' * }); */ declare function createSpatialReference(params?: any, ...args: any[]): SpatialReference; /** Tests if given geometry has valid spatial reference.*/ declare function isValidSpatialReference(s: any): boolean; declare function equalSpatialReference(a: any, b: any): boolean; /** * Function to create an instance of {.Point} by some alternative arguments. * @param [params] an init object or an argument list, see the sample. * @returns {Point} a Point. * @example * * // create by 2 arguments and sr object. * var x = -180; * var y = -90; * var sr = { wkid: 4326 }; * * var point = ct.mapping.geometry.createPoint(x,y,sr); * * // create by 2 arguments and wk parameter * var x = -180; * var y = -90; * var wkid = 4326; * * var point = ct.mapping.geometry.createPoint(x,y,wkid); * * // create by 2 arguments and without sr * var x = -180; * var y = -90; * * var point = ct.mapping.geometry.createPoint(x,y); * * // create by 1 number argument * var xAndY = 180; * * var point = ct.mapping.geometry.createPoint(xAndY); * * // create by 1 object argument and wkid * var e = { * x : -180, * y : -90, * wkid : 4326 * }; * * var point = ct.mapping.geometry.createPoint(e); * * // create by 1 object argument with spatialReference * var e = { * x : -180, * y : -90, * spatialReference : {wkid:4326} * }; * * var point = ct.mapping.geometry.createPoint(e); * * // create by 1 object argument without spatialReference * var e = { * x: 125, * y: 130, * }; * * var point = ctgeometry.createPoint(e); * */ declare function createPoint(_params: any, ...args: any[]): Point; /** * Function to create an instance of {.Extent} by some alternative arguments. * @param [params] an init object or an argument list, see the sample. * @returns {Extent} a Extent. * @example * * // create by 4 arguments and sr object. * var xmin = -180; * var ymin = -90; * var xmax = 180; * var ymax = 90; * var sr = { wkid: 4326 }; * * var extent = ct.mapping.geometry.createExtent(minx,miny,maxx,maxy,sr); * * // create by 4 arguments and wk parameter * var xmin = -180; * var ymin = -90; * var xmax = 180; * var ymax = 90; * var wkid = 4326; * * var extent = ct.mapping.geometry.createExtent(minx,miny,maxx,maxy,wkid); * * // create by 4 arguments and without sr * var xmin = -180; * var ymin = -90; * var xmax = 180; * var ymax = 90; * * var extent = ct.mapping.geometry.createExtent(minx,miny,maxx,maxy); * * // create by 2 arguments and wkid parameter * var width = 400; * var heigth = 200; * var wkid = 4326; * * var extent = ct.mapping.geometry.createExtent(width,height,wkid); * * // create by 2 arguments without sr * var width = 400; * var heigth = 200; * * var extent = ct.mapping.geometry.createExtent(width,height); * * // create by 1 number argument * var widthAndHeight = 400; * * var extent = ct.mapping.geometry.createExtent(widthAndHeight); * * // create by 1 object argument and wkid * var e = { * xmin : -180, * ymin : -90, * xmax : 180, * ymax : 90, * wkid : 4326 * }; * * var extent = ct.mapping.geometry.createExtent(e); * * // create by 1 object argument with spatialReference * var e = { * xmin : -180, * ymin : -90, * width: 360, * height : 180, * spatialReference : {wkid:4326} * }; * * var extent = ct.mapping.geometry.createExtent(e); * * // create by 1 object argument without spatialReference * var e = { * width: 360, * height : 180, * }; * * var extent = ct.mapping.geometry.createExtent(e); * * // create by 1 object argument without spatialReference using center. * var e = { * center:{x:10,y:10}, * width: 360, * height : 180, * }; * * var extent = ct.mapping.geometry.createExtent(e); * */ declare function createExtent(params?: any, ...args: any[]): Extent; /** * Function to create an instance of {TimeExtent} by some alternative arguments. * @param [params] an init object or an argument list, see the sample. * @returns {TimeExtent} a Point. * @example * * // create by object constructor * var timeextent = ct.mapping.geometry.createTimeExtent({ * start: new Date("5/10/2010"), * end: new Date("6/10/2010") * }); * * // create by object with strings * var timeextent = ct.mapping.geometry.createTimeExtent({ * start: "5/10/2010", * end: "6/10/2010" * }); * * // create by object with strings and long names * var timeextent = ct.mapping.geometry.createTimeExtent({ * startTime: "5/10/2010", * endTime: "6/10/2010" * }); * * // create by two parameter strings * var timeextent = ct.mapping.geometry.createTimeExtent("5/10/2010","6/10/2010"); * * // create by two parameter dates * var timeextent = ct.mapping.geometry.createTimeExtent(new Date("5/10/2010"),new Date("6/10/2010")); * * // create by one parameter string (or date) / only start date * var timeextent = ct.mapping.geometry.createTimeExtent("5/10/2010"); * */ declare function createTimeExtent(params?: any, ...args: any[]): TimeExtent; /** * Compares two timeextents for equality. */ declare function equalTimeExtent(a: any, b: any): boolean; /** * This method returns a new extent, with same aspect ratio of extentReference, but center of extentIn. * This method can be used to ensure that a geo extent matches the aspect ratio of an screen extent. * @returns {Extent} a new corrected extent. * @example * * var correctedExtent = ct.mapping.geometry.correctAspectRatio( * { xmin:-180,ymin:-90,xmax:180,ymax:90}, * { width: 100, height: 125} * ); * */ declare function correctAspectRatio(extentIn: any, extentReference: any): Extent; /** * Checks geometry equality, coordinate equality checked by @arcgis/core/geometry/mathUtils._equals, which uses an epsilon of * 1e-8 for number compare. */ declare function equal(gA: any, gB: any, eps: any): any; declare function epsilonEqual(a: any, b: any, eps: any): boolean; /** * This function calculates a pixel size at a given scale. * This is a very coarse grained function, to caluclate the resolution part in LODs. */ declare function calcPixelResolutionAtScale(scale: any, spatialReference: any, dpi: any): number; /** * Calculates a geodetic value for a metric value * (assumes you are sitting on the equator). */ declare function calcMetricToGeodetic(value: any): number; /** * Calculates a geodetic value for a metric value * (assumes you are sitting on the equator). */ declare function calcGeodeticToMetric(value: any): number; declare function isWebMercator(spatialReference: any): any; declare function isProjected(spatialReference: any): boolean; declare function isGeographic(spatialReference: any): boolean; declare function calcExtent(arrayOfGeometries: any): any; /** * Checks if a projection uses decimal units * @param projection projection object * @returns true if decimal unit is used */ declare function isProjectionDecimal(projection: any): boolean; /** * Checks if a projection uses degree units * @param projection projection object * @returns true if decimal unit is used */ declare function isProjectionDegree(projection: any): boolean; /** * Returns projection format * @param projection projection object * @returns unit ("m" if no unit defined) */ declare function getProjectionFormat(projection: any): Any; declare function removeAdjacentPoints(geometry: any): any; export { exports as default };