forked from mapbox/mapnik-vector-tile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_utils.hpp
More file actions
32 lines (26 loc) · 1.16 KB
/
test_utils.hpp
File metadata and controls
32 lines (26 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __MAPNIK_VECTOR_TEST_UTILS_H__
#define __MAPNIK_VECTOR_TEST_UTILS_H__
// mapnik
#include <mapnik/memory_datasource.hpp>
#include <mapnik/image.hpp>
#include <mapnik/image_any.hpp>
#include <memory>
namespace testing {
std::shared_ptr<mapnik::memory_datasource> build_ds(double x,double y, bool second=false);
mapnik::geometry::geometry<double> read_geojson(std::string const& geojson_file);
std::shared_ptr<mapnik::memory_datasource> build_geojson_ds(std::string const& geojson_file);
mapnik::datasource_ptr build_geojson_fs_ds(std::string const& geojson_file);
unsigned compare_images(std::string const& src_fn,
std::string const& dest_fn,
int threshold=16,
bool alpha=true);
unsigned compare_images(mapnik::image_rgba8 const& src1,
std::string const& filepath,
int threshold=16,
bool alpha=true);
unsigned compare_images(mapnik::image_any const& src1,
std::string const& filepath,
int threshold=16,
bool alpha=true);
}
#endif // __MAPNIK_VECTOR_TEST_UTILS_H__