suggestWktAxisOrder
The other order of the two, when the first position in WKT text lies outside
the world in the order given but inside it in the other, which is the sign of
a file written the other way round. The position is the first one after a
WKT geometry type (POINT, POLYGON, GEOMETRYCOLLECTION and so on, in any
case), so a bracketed pair in other text is not mistaken for one. Null for
GeoJSON, text with no such position, a first position that fits the order
given, and one that fits neither.
This is a function exported by @mapcairn/core, checked against version 0.2.0.
Signature
import { suggestWktAxisOrder } from "@mapcairn/core";
function suggestWktAxisOrder(text: string, order: WktAxisOrder): WktAxisOrder | null;
Parameters
text(string)order(WktAxisOrder): The order the text is being read in.
Returns
WktAxisOrder | null
Remarks
Only the first MAX_AXIS_SCAN_CHARACTERS characters are
read, and text over MAX_IMPORT_BYTES gets no suggestion, since
parseShapeFile would refuse it. The scan is one pass with no
recursion, so the depth limit does not apply to it.