add specialisations for coord_type = std::int64_t
This commit is contained in:
parent
ba573e558b
commit
9d05667723
2 changed files with 26 additions and 1 deletions
|
@ -38,6 +38,11 @@ struct not_is_variant<mapnik::geometry::geometry<double>, karma::domain>
|
|||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <>
|
||||
struct not_is_variant<mapnik::geometry::geometry<std::int64_t>, karma::domain>
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <>
|
||||
struct variant_which< mapnik::geometry::geometry<double> >
|
||||
{
|
||||
|
@ -47,6 +52,15 @@ struct variant_which< mapnik::geometry::geometry<double> >
|
|||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct variant_which< mapnik::geometry::geometry<std::int64_t> >
|
||||
{
|
||||
static int call(mapnik::geometry::geometry<std::int64_t> const& v)
|
||||
{
|
||||
return v.which();
|
||||
}
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename T, typename Tuple>
|
||||
|
@ -89,6 +103,17 @@ struct compute_compatible_component_variant<mapnik::geometry::geometry<double>,
|
|||
}
|
||||
};
|
||||
|
||||
template <typename Expected>
|
||||
struct compute_compatible_component_variant<mapnik::geometry::geometry<std::int64_t>, Expected>
|
||||
: detail::has_type<Expected, mapnik::geometry::geometry<std::int64_t>::types>
|
||||
{
|
||||
using compatible_type = Expected;
|
||||
static bool is_compatible(int index)
|
||||
{
|
||||
return (index == detail::index<compatible_type, mapnik::geometry::geometry<std::int64_t>::types>::value);
|
||||
}
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,6 @@ namespace mapnik { namespace wkt {
|
|||
|
||||
using sink_type = std::back_insert_iterator<std::string>;
|
||||
template struct wkt_generator_grammar<sink_type, mapnik::geometry::geometry<double>>;
|
||||
//template struct wkt_generator_grammar<sink_type, mapnik::geometry::geometry<std::int64_t>>;
|
||||
template struct wkt_generator_grammar<sink_type, mapnik::geometry::geometry<std::int64_t>>;
|
||||
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue