(input)
| 109869 | return t(point); |
| 109870 | } |
| 109871 | function quantizeGeometry(input) { |
| 109872 | var output; |
| 109873 | switch(input.type){ |
| 109874 | case "GeometryCollection": |
| 109875 | output = { |
| 109876 | type: "GeometryCollection", |
| 109877 | geometries: input.geometries.map(quantizeGeometry) |
| 109878 | }; |
| 109879 | break; |
| 109880 | case "Point": |
| 109881 | output = { |
| 109882 | type: "Point", |
| 109883 | coordinates: quantizePoint(input.coordinates) |
| 109884 | }; |
| 109885 | break; |
| 109886 | case "MultiPoint": |
| 109887 | output = { |
| 109888 | type: "MultiPoint", |
| 109889 | coordinates: input.coordinates.map(quantizePoint) |
| 109890 | }; |
| 109891 | break; |
| 109892 | default: |
| 109893 | return input; |
| 109894 | } |
| 109895 | if (input.id != null) output.id = input.id; |
| 109896 | if (input.bbox != null) output.bbox = input.bbox; |
| 109897 | if (input.properties != null) output.properties = input.properties; |
| 109898 | return output; |
| 109899 | } |
| 109900 | function quantizeArc(input) { |
| 109901 | var i = 0, j = 1, n = input.length, p, output = new Array(n); // pessimistic |
| 109902 | output[0] = t(input[0], 0); |
no test coverage detected