aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/reverse_geocoder/core/common.h
blob: 090407ffd9ade406cdf69747c68ac2764ebfb572 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <util/system/compiler.h>
#include <util/system/types.h>

namespace NReverseGeocoder {
    using TCoordinate = i32;
    using TGeoId = ui64;
    using TNumber = ui32;
    using TRef = ui32;
    using TSquare = i64;
    using TVersion = ui64;

    const double EARTH_RADIUS = 6371000.0;

    inline TCoordinate ToCoordinate(double x) {
        return x * 1e6;
    }

    inline double ToDouble(TCoordinate x) {
        return x / 1e6;
    }

}