-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #870 from conveyal/check-stop-pop-density
Check population density around stops
- Loading branch information
Showing
4 changed files
with
634 additions
and
5 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/com/conveyal/gtfs/error/SuspectStopLocationError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.conveyal.gtfs.error; | ||
|
||
import com.conveyal.gtfs.validator.model.Priority; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Indicates that a stop is in a suspect location, for example in a place like a desert where there are not enough | ||
* people to support public transit. This can be the result of incorrect coordinate transforms into WGS84. | ||
* Stops are often located on "null island" at (0,0). This can also happen in other coordinate systems before they | ||
* are transformed to WGS84: the origin of a common French coordinate system is in the Sahara. | ||
*/ | ||
public class SuspectStopLocationError extends GTFSError implements Serializable { | ||
public static final long serialVersionUID = 1L; | ||
|
||
public SuspectStopLocationError(String stopId, long line) { | ||
super("stops", line, "stop_id", stopId); | ||
} | ||
|
||
@Override public String getMessage() { | ||
return String.format( | ||
"Stop with ID %s is in a sparsely populated area (fewer than 5 inhabitants per square km in any " + | ||
"neighboring 1/4 degree cell)", | ||
affectedEntityId | ||
); | ||
} | ||
|
||
@Override public Priority getPriority() { | ||
return Priority.MEDIUM; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.