Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #345 from mapzen/chuck/dont-upload-traces-less-tha…
Browse files Browse the repository at this point in the history
…n-50-meters

Remove check for minimum number of points (no longer needed)
  • Loading branch information
baldur committed Nov 5, 2014
2 parents 449f805 + bc6449c commit deb805e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
5 changes: 0 additions & 5 deletions src/main/java/com/mapzen/open/core/DataUploadService.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
import static org.apache.http.protocol.HTTP.UTF_8;

public class DataUploadService extends Service {
private static final int MIN_NUM_TRACKING_POINTS = 10;
private static final int MIN_RANGE_IN_METERS = 50;

private static final String RANGE_QUERY_EXT = " from "
Expand Down Expand Up @@ -217,10 +216,6 @@ public DOMSource getDocument(String groupId) {
}
trkElement.appendChild(trksegElement);
Element documentElement = document.getDocumentElement();
int numberOfPoints = documentElement.getElementsByTagName("ele").getLength();
if (numberOfPoints < MIN_NUM_TRACKING_POINTS) {
return null;
}
if (calculateMaxRange(groupId) < MIN_RANGE_IN_METERS) {
return null;
}
Expand Down
17 changes: 0 additions & 17 deletions src/test/java/com/mapzen/open/core/DataUploadServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,6 @@ public void shouldGenerateGPX_shouldSubmit() throws Exception {
eq(expectedRouteDescription));
}

@Test
public void shouldGenerateGPX_shouldNotSubmit() throws Exception {
Token token = new Token("stuff", "fun");
app.setAccessToken(token);

String expectedGroupId = "test_route";
String expectedRouteDescription = "does not matter";
fillLocationsTable(expectedGroupId, 4);
DataUploadService spy = spy(service);
spy.onStartCommand(null, 0, 0);
verify(spy).generateGpxXmlFor(expectedGroupId, expectedRouteDescription);
verify(spy).getDocument(expectedGroupId);
verify(spy, never()).submitCompressedFile(any(ByteArrayOutputStream.class),
eq(expectedGroupId),
eq(expectedRouteDescription));
}

@Test
public void shouldHaveLocationsFromAllRoutesInGroup() throws Exception {
String groupId = "test-group-id";
Expand Down

0 comments on commit deb805e

Please sign in to comment.