parser<T extends Point<num> > method
Creates a WKT factory instace using the point
factory.
An optional pointWithM
factory can be given to instantiate any point
objects with M coordinates.
Supported WKT geometry types: 'POINT', 'LINESTRING', 'POLYGON', 'MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION'.
Implementation
WktFactory<T> parser<T extends Point>(
PointFactory<T> point, [
PointFactory<T>? pointWithM,
]) =>
WktFactory<T>(
pointFactory: ({required bool expectM}) =>
expectM ? pointWithM ?? point : point,
);