Skip to content

Commit

Permalink
rip out more
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Oct 5, 2024
1 parent 3c824ab commit 7e2d1c3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
3 changes: 0 additions & 3 deletions include/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ uint64_t getFileSize(std::string filename);
std::vector<OffsetAndLength> getNewlineChunks(const std::string &filename, uint64_t chunks);

void decompress_string(std::string& output, const char* input, uint32_t inputSize, bool asGzip = false);
double bboxElementFromStr(const std::string& number);

std::vector<std::string> parseBox(const std::string& bbox);

std::string compress_string(const std::string& str,
int compressionlevel = Z_DEFAULT_COMPRESSION,
Expand Down
26 changes: 0 additions & 26 deletions src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <iomanip>
#include <sstream>
#include <cstring>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>

#include <sys/stat.h>
#include "helpers.h"
Expand All @@ -25,30 +23,6 @@

using namespace std;

// Bounding box string parsing

double bboxElementFromStr(const std::string& number) {
try {
return boost::lexical_cast<double>(number);
} catch (boost::bad_lexical_cast&) {
std::cerr << "Failed to parse coordinate " << number << std::endl;
exit(1);
}
}

// Split bounding box provided as a comma-separated list of coordinates.
std::vector<std::string> parseBox(const std::string& bbox) {
std::vector<std::string> bboxParts;
if (!bbox.empty()) {
boost::split(bboxParts, bbox, boost::is_any_of(","));
if (bboxParts.size() != 4) {
std::cerr << "Bounding box must contain 4 elements: minlon,minlat,maxlon,maxlat" << std::endl;
exit(1);
}
}
return bboxParts;
}

// zlib routines from http://panthema.net/2007/0328-ZLibString.html

// Compress a STL string using zlib with given compression level, and return the binary data
Expand Down

0 comments on commit 7e2d1c3

Please sign in to comment.