(json)
| 14 | // values exceed CRS:84 bounds (lon [-180,180], lat [-90,90]), indicating |
| 15 | // meter-based projected units (e.g. from WMS GetFeatureInfo responses). |
| 16 | function _hasProjectedCoordinates(json) { |
| 17 | if (json.crs != null) return true; |
| 18 | let c = _firstCoordinate(json); |
| 19 | return c !== null && (Math.abs(c[0]) > 180 || Math.abs(c[1]) > 90); |
| 20 | } |
| 21 | |
| 22 | // Extract the first [x, y] coordinate pair from a GeoJSON object, |
| 23 | // drilling into FeatureCollection → Feature → Geometry → coordinates. |
no test coverage detected