| 109494 | return arcs.map(ring); |
| 109495 | } |
| 109496 | function geometry(o) { |
| 109497 | var type = o.type, coordinates; |
| 109498 | switch(type){ |
| 109499 | case "GeometryCollection": |
| 109500 | return { |
| 109501 | type: type, |
| 109502 | geometries: o.geometries.map(geometry) |
| 109503 | }; |
| 109504 | case "Point": |
| 109505 | coordinates = point(o.coordinates); |
| 109506 | break; |
| 109507 | case "MultiPoint": |
| 109508 | coordinates = o.coordinates.map(point); |
| 109509 | break; |
| 109510 | case "LineString": |
| 109511 | coordinates = line(o.arcs); |
| 109512 | break; |
| 109513 | case "MultiLineString": |
| 109514 | coordinates = o.arcs.map(line); |
| 109515 | break; |
| 109516 | case "Polygon": |
| 109517 | coordinates = polygon(o.arcs); |
| 109518 | break; |
| 109519 | case "MultiPolygon": |
| 109520 | coordinates = o.arcs.map(polygon); |
| 109521 | break; |
| 109522 | default: |
| 109523 | return null; |
| 109524 | } |
| 109525 | return { |
| 109526 | type: type, |
| 109527 | coordinates: coordinates |
| 109528 | }; |
| 109529 | } |
| 109530 | return geometry(o2); |
| 109531 | } |
| 109532 | |