Create a spatial reference that represents a specific UTM zone. \param zone Zone number. Must be non-zero and <= 60 and >= -60 \return A SpatialReference that represents the specified zone, or an invalid SpatialReference on error. */
| 466 | an invalid SpatialReference on error. |
| 467 | */ |
| 468 | SpatialReference SpatialReference::wgs84FromZone(int zone) |
| 469 | { |
| 470 | uint32_t abszone(std::abs(zone)); |
| 471 | |
| 472 | if (abszone == 0 || abszone > 60) |
| 473 | return SpatialReference(); |
| 474 | |
| 475 | std::string code; |
| 476 | if (zone > 0) |
| 477 | code = "EPSG:326"; |
| 478 | else |
| 479 | code = "EPSG:327"; |
| 480 | |
| 481 | code += ((abszone < 10) ? "0" : "") + Utils::toString(abszone); |
| 482 | return SpatialReference(code); |
| 483 | } |
| 484 | |
| 485 | |
| 486 | bool SpatialReference::isWKT2(const std::string& wkt) |
nothing calls this directly
no test coverage detected