Check whether or not a spatialReference is supported by proj4 library. Attempt to load from epsg source if not.
to be checked to see if it's supported by proj4. Can be ESRI SR object, WKID integer, EPSG string or WKT.
true if proj was defined or was able to download definition. false if out of luck
Utility for checking a set of spatial references, rejects if one cannot be used
set of Spatial references to be checked. Can be ESRI SR object, WKID integer, EPSG string or WKT.
resolves after all references succeed the check. rejects if any test fails.
Convert a projection to an string that is compatible with proj4. If it is an SpatialReference or an integer it will be converted.
an SpatialReference, integer or string. Strings will be unchanged and unchecked, ints and SpatialReference objects will be converted.
A proj4 friendly projection, in the form EPSG:#### or a WKT
Reproject an Extent object on the client. Does not require network traffic, but may not handle conversion between projection types as well. Internally it tests 8 points along each edge and takes the max extent of the result. To project an extent without warping, convert to a polygon and do a standard geometry projection (result will not be guaranteed to retain Extent characteristics)
resolves with the reprojected extent
Reproject a GeoJSON object in place. Note the .crs of the object will not be updated or corrected. Valid formats for the spatial reference parameters are: RAMP SpatialReference, WKID number, WKT string, or EPSG:#### string
Optional
inputSR: string | number | SpatialReferencespatial reference of the GeoJSON. If missing it will attempt to use any crs data in the GeoJSON, defaulting to Lat Long.
Optional
outputSR: string | number | SpatialReferencespatial reference to project to. If missing, will use Lat Long.
resolves with projected geoJson
Project a geometry using local calculations (proj4)
the spatial reference of the result (as SpatialReference, integer WKID or an EPSG string)
a RAMP API Geometry object
resolve in a RAMP API Geometry object with co-ordinates in the destination projection
Provide an alternate lookup function to find proj4 projection strings based off EPSG codes. Be aware this setting
is page-wide, and will impact any instance of RAMP running.
Function signature should be f(code: string | number): Promise<string>
.
The function should be able to parse codes that are
Add a projection definition.