2016-04-28 21:43:04 +00:00
|
|
|
struct type_and_string {
|
2016-04-28 22:11:57 +00:00
|
|
|
int type;
|
|
|
|
std::string string;
|
2016-04-28 21:43:04 +00:00
|
|
|
|
2016-04-28 22:11:57 +00:00
|
|
|
bool operator<(const type_and_string &o) const;
|
2016-04-28 21:43:04 +00:00
|
|
|
};
|
|
|
|
|
2016-08-29 21:59:28 +00:00
|
|
|
struct layermap_entry {
|
|
|
|
size_t id;
|
|
|
|
std::set<type_and_string> file_keys;
|
2016-09-20 00:53:31 +00:00
|
|
|
int minzoom;
|
|
|
|
int maxzoom;
|
2016-08-29 21:59:28 +00:00
|
|
|
|
|
|
|
layermap_entry(size_t _id) {
|
|
|
|
id = _id;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-01-28 22:18:31 +00:00
|
|
|
sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable);
|
2014-09-29 19:48:58 +00:00
|
|
|
|
|
|
|
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size);
|
|
|
|
|
2017-04-07 20:21:38 +00:00
|
|
|
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description);
|
2014-09-29 19:48:58 +00:00
|
|
|
|
|
|
|
void mbtiles_close(sqlite3 *outdb, char **argv);
|
2016-05-03 18:14:09 +00:00
|
|
|
|
|
|
|
void aprintf(std::string *buf, const char *format, ...);
|
2016-09-20 18:04:24 +00:00
|
|
|
|
|
|
|
std::map<std::string, layermap_entry> merge_layermaps(std::vector<std::map<std::string, layermap_entry> > const &maps);
|