MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / BoundingBox

Function BoundingBox

scripts/osrm-runner.js:96–100  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

94}
95// Parse geographic bounding box coordinates from command line
96function BoundingBox(x) {
97 if (!(this instanceof BoundingBox)) return new BoundingBox(x);
98 const v = x.match(/[+-]?\d+(?:\.\d*)?|\.\d+/g);
99 this.poly = turf.bboxPolygon(v.slice(0,4).map(x => Number(x)));
100}
101const optionsList = [
102 {name: 'help', alias: 'h', type: Boolean, description: 'Display this usage guide.', defaultValue: false},
103 {name: 'verbose', alias: 'v', type: Boolean, description: 'Print detailed CSV output for each query', defaultValue: false},

Callers 1

osrm-runner.jsFile · 0.85

Calls 2

NumberClass · 0.85
matchMethod · 0.45

Tested by

no test coverage detected