HydroCoupleOgc  0.1.0
OGC web service clients (WMS, WMTS, WCS, WFS) over Qt Network (0.1.0)
Loading...
Searching...
No Matches
crsurn.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2026 HydroCouple
3
16
17#ifndef HYDROCOUPLEOGC_CRSURN_H
18#define HYDROCOUPLEOGC_CRSURN_H
19
21
22#include <QString>
23
24namespace HydroCouple::Ogc
25{
30 {
31 QString authority;
32 QString code;
33
34 [[nodiscard]] bool isValid() const
35 {
36 return !authority.isEmpty() && !code.isEmpty();
37 }
38
40 [[nodiscard]] QString toString() const
41 {
42 return isValid() ? authority + QLatin1Char(':') + code : QString();
43 }
44
45 [[nodiscard]] bool operator==(const CrsIdentifier &other) const
46 {
47 return authority == other.authority && code == other.code;
48 }
49
58 [[nodiscard]] bool isCrs84() const;
59 };
60
78 [[nodiscard]] HYDROCOUPLEOGC_EXPORT CrsIdentifier
79 parseCrsIdentifier(const QString &text);
80
81} // namespace HydroCouple::Ogc
82
83#endif // HYDROCOUPLEOGC_CRSURN_H
Symbol visibility for the shared library.
#define HYDROCOUPLEOGC_EXPORT
Definition export.h:20
Definition axisorder.h:30
HYDROCOUPLEOGC_EXPORT CrsIdentifier parseCrsIdentifier(const QString &text)
Reads any of the spellings OGC services use for a system.
Definition crsurn.cpp:23
An authority and the code it assigns, e.g. EPSG and 3857.
Definition crsurn.h:30
bool isValid() const
Definition crsurn.h:34
QString authority
Definition crsurn.h:31
QString code
Definition crsurn.h:32
QString toString() const
Definition crsurn.h:40
bool operator==(const CrsIdentifier &other) const
Definition crsurn.h:45