Skip to content

Commit

Permalink
conan: Bump simfil to 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Jun 19, 2024
1 parent cb45857 commit 963f12c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate(self):

def requirements(self):
self.requires("fmt/10.2.1", override=True)
self.requires("simfil/0.1.3", transitive_headers=True)
self.requires("simfil/0.2.1", transitive_headers=True)
self.requires("spdlog/[~1]", transitive_headers=True)
self.requires("bitsery/[~5]")
self.requires("nlohmann_json/3.11.2", transitive_headers=True)
Expand Down
36 changes: 36 additions & 0 deletions libs/model/src/featurelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,42 @@
#include <bitsery/traits/string.h>

#include "simfil/model/bitsery-traits.h"
#include "geometry.h"

/** Bitsery serialization traits */
namespace bitsery
{

template <typename S>
void serialize(S& s, mapget::Point<float>& v) {
s.value4b(v.x);
s.value4b(v.y);
s.value4b(v.z);
}

template <typename S>
void serialize(S& s, mapget::Point<double>& v) {
s.value8b(v.x);
s.value8b(v.y);
s.value8b(v.z);
}

}

namespace
{
template <class... Args>
std::unique_ptr<simfil::Environment> makeEnvironment(Args&& ...args)
{
auto env = std::make_unique<simfil::Environment>(std::forward<Args>(args)...);
env->functions["geo"] = &mapget::GeoFn::Fn;
env->functions["point"] = &mapget::PointFn::Fn;
env->functions["bbox"] = &mapget::BBoxFn::Fn;
env->functions["linestring"] = &mapget::LineStringFn::Fn;

return env;
}
}

namespace mapget
{
Expand Down

0 comments on commit 963f12c

Please sign in to comment.