mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 09:25:41 +02:00
Use a typedef for variables representing quadkey/hilbert indices
This commit is contained in:
+5
-4
@@ -2,6 +2,7 @@
|
||||
#define PROJECTION_HPP
|
||||
|
||||
#define GLOBAL_DETAIL 32
|
||||
typedef unsigned long long index_t;
|
||||
|
||||
void lonlat2tile(double lon, double lat, int zoom, long long *x, long long *y);
|
||||
void epsg3857totile(double ix, double iy, int zoom, long long *x, long long *y);
|
||||
@@ -19,14 +20,14 @@ struct projection {
|
||||
extern struct projection *projection;
|
||||
extern struct projection projections[];
|
||||
|
||||
extern unsigned long long (*encode_index)(unsigned int wx, unsigned int wy);
|
||||
extern void (*decode_index)(unsigned long long index, unsigned *wx, unsigned *wy);
|
||||
extern index_t (*encode_index)(unsigned int wx, unsigned int wy);
|
||||
extern void (*decode_index)(index_t index, unsigned *wx, unsigned *wy);
|
||||
|
||||
unsigned long long encode_quadkey(unsigned int wx, unsigned int wy);
|
||||
void decode_quadkey(unsigned long long index, unsigned *wx, unsigned *wy);
|
||||
void decode_quadkey(index_t index, unsigned *wx, unsigned *wy);
|
||||
|
||||
unsigned long long encode_hilbert(unsigned int wx, unsigned int wy);
|
||||
void decode_hilbert(unsigned long long index, unsigned *wx, unsigned *wy);
|
||||
void decode_hilbert(index_t index, unsigned *wx, unsigned *wy);
|
||||
|
||||
unsigned coordinate_to_encodable(long long coord);
|
||||
long long decoded_to_coordinate(unsigned coord);
|
||||
|
||||
Reference in New Issue
Block a user