Memory-map geobuf input instead of reading it into a temporary string

This commit is contained in:
Eric Fischer
2017-08-28 11:30:30 -07:00
parent 5943c82457
commit 7c031a9796
3 changed files with 22 additions and 12 deletions
+2 -2
View File
@@ -313,8 +313,8 @@ void readFeatureCollection(protozero::pbf_reader &pbf, size_t dim, double e, std
}
}
void parse_geobuf(struct serialization_state *sst, std::string const &src, int layer, std::string layername) {
protozero::pbf_reader pbf(src);
void parse_geobuf(struct serialization_state *sst, const char *src, size_t len, int layer, std::string layername) {
protozero::pbf_reader pbf(src, len);
size_t dim = 2;
double e = 1e6;