NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
crs_const.h
Go to the documentation of this file.
1 #ifndef SDK_CRS_CONST_H_
10 #define SDK_CRS_CONST_H_
11 #pragma once
12 
13 #if !defined(__cplusplus)
14 #error C++ compiler required.
15 #endif
16 
17 #include <base/inc/platform.h>
18 #include <base/inc/base_types.h>
21 
22 #if defined(__cplusplus)
23 extern "C++"
24 {
25 #endif
26 
27 #if defined(__cplusplus)
28 extern "C"
29 {
30 #endif
31 
35 #if !defined(kRADIUS)
36 #define kRADIUS 6378137.0L
37 #endif
38 #if !defined(kEQUATOR)
40 #define kEQUATOR 40075016.6855784861L
41 #endif
42 #if !defined(kGeoIntPI)
43 #define kGeoIntPI 2147483648.0 // 0x80000000
44 #endif
45 #if !defined(kGeoInt2PI)
46 #define kGeoInt2PI (2*kGeoIntPI) // 0x100000000
47 #endif
48 #if !defined(kGeoIntPI_2)
49 #define kGeoIntPI_2 (kGeoIntPI/2) // 0x40000000
50 #endif
51 #if !defined(kGeoInt2Deg)
52 #define kGeoInt2Deg (180/kGeoIntPI) // 8.38190317153930664e-8L
53 #endif
54 #if !defined(kGeoInt2Rad)
55 #define kGeoInt2Rad (kPI/kGeoIntPI) // 1.46291807926715968e-9L
56 #endif
57 #if !defined(kRad2GeoInt)
58 #define kRad2GeoInt (kGeoIntPI/kPI) // 6.83565275576431590e+8L
59 #endif
60 #if !defined(kDeg2Rad)
61 #define kDeg2Rad (kPI/180) // 1.74532925199432958e-2L
62 #endif
63 #if !defined(kRad2Deg)
64 #define kRad2Deg (180/kPI) // 5.72957795130823209e+1L
65 #endif
66 #if !defined(kWGS84_NAME)
69 #define kWGS84_NAME "WGS84"
70 #endif
71 #if !defined(kWGS84_E)
73 #define kWGS84_E 0.08181919084262150L
74 #endif
75 #if !defined(kWGS84_E2)
76 #define kWGS84_E2 0.0066943799901413165L
77 #endif
78 #if !defined(kWGS84_E4)
79 #define kWGS84_E4 4.48147234522478E-05L
80 #endif
81 #if !defined(kWGS84_E6)
82 #define kWGS84_E6 3.0000678794192E-07L
83 #endif
84 #if !defined(kWGS84_E8)
85 #define kWGS84_E8 2.00835943810145E-09L
86 #endif
87 #if !defined(kWGS84_ESQUARED)
89 #define kWGS84_ESQUARED kWGS84_E2
90 #endif
91 #if !defined(kWGS84_INVERSE_FLATTENING)
93 #define kWGS84_INVERSE_FLATTENING 298.257223563L
94 #endif
95 #if !defined(kWGS84_SEMIMAJOR)
97 #define kWGS84_SEMIMAJOR 6378137.0L
98 #endif
99 #if !defined(kWGS84_SEMIMINOR)
101 #define kWGS84_SEMIMINOR (kWGS84_SEMIMAJOR*(1-(1/kWGS84_INVERSE_FLATTENING))) // 6356752.3142L
102 #endif
103 
106 #if defined(__cplusplus)
107 } // extern "C"
108 #endif
109 
110 #ifndef SDK_CRS_NAMESPACE
111 #define SDK_CRS_NAMESPACE SDK_NAMESPACE::crs
112 #endif // SDK_CRS_NAMESPACE
113 
114 #ifndef SDK_CRS_BEGIN_NAMESPACE
115 #define SDK_CRS_BEGIN_NAMESPACE namespace SDK_NAMESPACE { \
116  namespace crs {
117 #endif // SDK_CRS_BEGIN_NAMESPACE
118 
119 #ifndef SDK_CRS_END_NAMESPACE
120 #define SDK_CRS_END_NAMESPACE } }
121 #endif // SDK_CRS_END_NAMESPACE
122 
123 SDK_CRS_BEGIN_NAMESPACE
124 
128 typedef double LinearUnit;
129 
133 typedef double AngularUnit;
134 
137 typedef enum AngularUnitType {
143 
146 typedef enum AxisOrientation {
167 
234 
277 
278 static const char* ProjectionParameterNames[] = {
279  "azimuth",
280  "central_meridian",
281  "central_parllel",
282  "scale_factor",
283  "latitude_of_origin",
284  "longitude_of_origin",
285  "standard_parallel_1",
286  "standard_parallel_2",
287  "coordinate_unit",
288  "semi_major_axis",
289  "semi_minor_axis",
290  "false_easting",
291  "false_northing",
292  "utm_zone",
293  "utm_is_north",
294  "utm_autoset",
295 };
296 
304 } ProjectionPropertyID;
308 
311 typedef enum ProjectionClassID {
322 
323 static const wchar_t* kProjectionClassNames[] = {
324  L"Mercator",
325  L"Transverse_Mercator",
326  L"Lambert_Conformal_Conic",
327  L"Geo",
328  L"Gnomonic",
329  L"Stereographic",
330  L"Local_Cartesian",
331  L"UTM",
332 };
333 
334 static const double kMercatorDegLatMax = 85.001;
335 static const double kMercatorDegLatMin = -85.001;
336 
337 SDK_CRS_END_NAMESPACE
338 
339 #if defined(__cplusplus)
340 } // extern "C++"
341 #endif
342 
343 #endif // SDK_CRS_CONST_H_
kProjPar_FalseNorthing
@ kProjPar_FalseNorthing
False northing.
Definition: crs_const.h:265
kProjPar_LongitudeOfLocalScale
@ kProjPar_LongitudeOfLocalScale
Longitude of position for getting a local scale.
Definition: crs_const.h:273
kAxisOrientationNorth
@ kAxisOrientationNorth
Increasing ordinates values go North. This is usually used for Grid Y coordinates and Latitude.
Definition: crs_const.h:152
kAxisOrientationEast
@ kAxisOrientationEast
Increasing ordinates values go East. This is rarely used.
Definition: crs_const.h:156
kAngularUnitTypeGeoInt
@ kAngularUnitTypeGeoInt
GeoInt.
Definition: crs_const.h:139
kProjPar_UTMZone
@ kProjPar_UTMZone
UTM Zone.
Definition: crs_const.h:267
kProjPar_SemiMajorAxis
@ kProjPar_SemiMajorAxis
Semi-major axis of an ellipsoid.
Definition: crs_const.h:259
kProjPar_LongitudeOfCenter
@ kProjPar_LongitudeOfCenter
Longitude of the Center of the Projection.
Definition: crs_const.h:239
base_types.h
SDK base types.
kProjectionClassID_PolarStereographic
@ kProjectionClassID_PolarStereographic
Polar Stereographic alias Stereographic.
Definition: crs_const.h:318
kProjPar_Azimuth
@ kProjPar_Azimuth
Azimuth of the Center Line.
Definition: crs_const.h:237
AngularUnitType
AngularUnitType
Describes the angular unit type for the geographic coordinate system.
Definition: crs_const.h:137
kAxisOrientationUnknown
@ kAxisOrientationUnknown
Unknown or unspecified axis orientation. This can be used for local or fitted coordinate systems.
Definition: crs_const.h:149
kProjPar_LatitudeOfLocalScale
@ kProjPar_LatitudeOfLocalScale
Latitude of position for getting a local scale.
Definition: crs_const.h:275
AxisOrientation
AxisOrientation
Describes the axis orientation.
Definition: crs_const.h:146
AngularUnit
double AngularUnit
Defines the angular unit. The value is the number of degrees per angular unit.
Definition: crs_const.h:133
kProjectionClassID_Stereographic
@ kProjectionClassID_Stereographic
Stereographic.
Definition: crs_const.h:317
kProjPar_LongitudeOfOrigin
@ kProjPar_LongitudeOfOrigin
Longitude of the Origin of the Projection.
Definition: crs_const.h:247
kAxisOrientationWest
@ kAxisOrientationWest
Increasing ordinates values go West. This is usually used for Grid X coordinates and Longitude.
Definition: crs_const.h:159
kAxisOrientationSouth
@ kAxisOrientationSouth
Increasing ordinates values go South. This is rarely used.
Definition: crs_const.h:154
kProjPar_ScaleFactor
@ kProjPar_ScaleFactor
Scale Reduction Factor at the Center of the Projection.
Definition: crs_const.h:243
kProjPar_LatitudeOfCenter
@ kProjPar_LatitudeOfCenter
Latitude of the Center of the Projection.
Definition: crs_const.h:241
kProjectionClassID_LambertConformalConic
@ kProjectionClassID_LambertConformalConic
Lambert Conformal Conic.
Definition: crs_const.h:314
kAxisOrientationUp
@ kAxisOrientationUp
Increasing ordinates values go up. This is used for vertical coordinate systems.
Definition: crs_const.h:162
kAngularUnitTypeUndefined
@ kAngularUnitTypeUndefined
Not applicable (Cartesian)
Definition: crs_const.h:141
kProjPar_UTMAutoset
@ kProjPar_UTMAutoset
UTM. Automatically set zone.
Definition: crs_const.h:271
kProjectionClassID_TransverseMercator
@ kProjectionClassID_TransverseMercator
Transverse Mercator.
Definition: crs_const.h:313
kProjectionClassID_Geo
@ kProjectionClassID_Geo
Geographic.
Definition: crs_const.h:315
kProjPar_FalseEasting
@ kProjPar_FalseEasting
False easting.
Definition: crs_const.h:263
ProjectionPropertyEnum
ProjectionPropertyEnum
Defines the projection properties.
Definition: crs_const.h:299
kProjPar_UTMIsNorth
@ kProjPar_UTMIsNorth
UTM. Currently in northern hemisphere.
Definition: crs_const.h:269
kProjPar_StandardParallel1
@ kProjPar_StandardParallel1
Latitude of Pseudo Standard Parallel1. Latitude of Southern Standard Parallel for Lambert Conformal C...
Definition: crs_const.h:251
kProjProperty_LocalScale
@ kProjProperty_LocalScale
Definition: crs_const.h:300
kAngularUnitTypeRadians
@ kAngularUnitTypeRadians
Radians.
Definition: crs_const.h:140
platform.h
Describes the platform constants.
kProjectionClassID_LocalCartesian
@ kProjectionClassID_LocalCartesian
Local Cartesian.
Definition: crs_const.h:319
kProjectionClassID_Gnomonic
@ kProjectionClassID_Gnomonic
Spherical gnomonic.
Definition: crs_const.h:316
geometry_base_types.h
Geometry base types.
kProjPar_StandardParallel2
@ kProjPar_StandardParallel2
Latitude of Pseudo Standard Parallel2. Latitude of Northern Standard Parallel for Lambert Conformal C...
Definition: crs_const.h:255
kProjPar_SemiMinorAxis
@ kProjPar_SemiMinorAxis
Semi-minor axis of an ellipsoid.
Definition: crs_const.h:261
ProjectionParameterEnum
ProjectionParameterEnum
Parameters for the different projections. Required parameters for all projections: ProjPar_Coordinate...
Definition: crs_const.h:235
kProjProperty_CorrespondedLocalScale
@ kProjProperty_CorrespondedLocalScale
Definition: crs_const.h:303
ProjectionClassID
ProjectionClassID
Projection classes.
Definition: crs_const.h:311
kProjPar_LatitudeOfOrigin
@ kProjPar_LatitudeOfOrigin
Latitude of the Origin of the Projection.
Definition: crs_const.h:245
kProjectionClassID_Mercator
@ kProjectionClassID_Mercator
Mercator.
Definition: crs_const.h:312
math_const.h
Math constants definition.
kAngularUnitTypeDegree
@ kAngularUnitTypeDegree
Degree.
Definition: crs_const.h:138
kProjPar_CoordinateUnit
@ kProjPar_CoordinateUnit
Linear units of coordinates in meters per unit.
Definition: crs_const.h:257
LinearUnit
SDK_CRS_BEGIN_NAMESPACE typedef double LinearUnit
Defines the linear unit. The value is the number of meters per linear unit.
Definition: crs_const.h:128
kAxisOrientationDown
@ kAxisOrientationDown
Increasing ordinates values go down. This is used for vertical coordinate systems.
Definition: crs_const.h:165
kProjectionClassID_UTM
@ kProjectionClassID_UTM
UTM.
Definition: crs_const.h:320