GeometryBuffer: add removeLastPoint (#702)

This commit is contained in:
Gustl22
2019-03-19 14:40:45 +01:00
committed by Emux
parent 4e37ae26c9
commit fb8e6dab20
5 changed files with 48 additions and 18 deletions

View File

@@ -259,7 +259,7 @@ public class GeoJsonTileDecoder implements ITileDecoder {
ring++;
parseCoordSequence(jp);
removeLastPoint();
mMapElement.removeLastPoint();
continue;
}
@@ -268,11 +268,6 @@ public class GeoJsonTileDecoder implements ITileDecoder {
}
}
private void removeLastPoint() {
mMapElement.pointNextPos -= 2;
mMapElement.index[mMapElement.indexCurrentPos] -= 2;
}
private void parseLineString(JsonParser jp)
throws JsonParseException, IOException {
mMapElement.startLine();

View File

@@ -127,15 +127,10 @@ public class OverpassTileDecoder implements ITileDecoder {
//ring++;
parseCoordSequence(element);
removeLastPoint();
mMapElement.removeLastPoint();
//}
}
private void removeLastPoint() {
mMapElement.pointNextPos -= 2;
mMapElement.index[mMapElement.indexCurrentPos] -= 2;
}
private void parseLine(OsmWay element) {
mMapElement.startLine();
parseCoordSequence(element);