de-templetize polyline generalizer
This commit is contained in:
@@ -98,18 +98,18 @@ void DescriptionFactory::AppendEncodedPolylineString(
|
||||
std::string & output
|
||||
) {
|
||||
if(return_encoded) {
|
||||
pc.printEncodedString(pathDescription, output);
|
||||
polyline_compressor.printEncodedString(pathDescription, output);
|
||||
} else {
|
||||
pc.printUnencodedString(pathDescription, output);
|
||||
polyline_compressor.printUnencodedString(pathDescription, output);
|
||||
}
|
||||
}
|
||||
|
||||
void DescriptionFactory::AppendEncodedPolylineString(std::string &output) const {
|
||||
pc.printEncodedString(pathDescription, output);
|
||||
polyline_compressor.printEncodedString(pathDescription, output);
|
||||
}
|
||||
|
||||
void DescriptionFactory::AppendUnencodedPolylineString(std::string &output) const {
|
||||
pc.printUnencodedString(pathDescription, output);
|
||||
polyline_compressor.printUnencodedString(pathDescription, output);
|
||||
}
|
||||
|
||||
// void DescriptionFactory::Run(const SearchEngine &sEngine, const unsigned zoomLevel) {
|
||||
|
||||
@@ -45,8 +45,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* and produces the description plus the encoded polyline */
|
||||
|
||||
class DescriptionFactory {
|
||||
DouglasPeucker<SegmentInformation> dp;
|
||||
PolylineCompressor pc;
|
||||
DouglasPeucker polyline_generalizer;
|
||||
PolylineCompressor polyline_compressor;
|
||||
PhantomNode start_phantom, target_phantom;
|
||||
|
||||
double DegreeToRadian(const double degree) const;
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
}
|
||||
|
||||
//Generalize poly line
|
||||
dp.Run(pathDescription, zoomLevel);
|
||||
polyline_generalizer.Run(pathDescription, zoomLevel);
|
||||
|
||||
//fix what needs to be fixed else
|
||||
for(unsigned i = 0; i < pathDescription.size()-1 && pathDescription.size() >= 2; ++i){
|
||||
|
||||
Reference in New Issue
Block a user