azavea / osmesa

OSMesa is an OpenStreetMap processing stack based on GeoTrellis and Apache Spark
Apache License 2.0
80 stars 26 forks source link

Road Changes #13

Closed fosskers closed 6 years ago

fosskers commented 7 years ago

TODO

fosskers commented 7 years ago

https://github.com/locationtech/jts/blob/master/modules/core/src/main/java/org/locationtech/jts/algorithm/Length.java#L31

How JTS calculates Line length. I'm not sure of the units.

fosskers commented 7 years ago

[info] 0.0 kilometers of roads were changed.

Works like a charm. :sunglasses:

fosskers commented 7 years ago

What was needed was to search for the key highway. See: https://wiki.openstreetmap.org/wiki/Key:highway

lossyrob commented 7 years ago

Check these values for the highway tag, these are the roads we want to count distance on:


 val tags =
        Set(
            "motorway",
"trunk",
"motorway_link",
"trunk_link",
"primary",
"secondary",
"tertiary",
"primary_link",
"secondary_link",
"tertiary_link",
"service",
"residential",
"unclassified",
"living_street",
"road"
            )
fosskers commented 7 years ago

Roger. My tests revealed a bug in VectorPipe that I'm fixing now / tomorrow morning.

fosskers commented 7 years ago
[info] 199.53569223578558 kilometers of roads were changed.

This number is down from the 260 that I was seeing yesterday before I started filtering on specific highway types. I'm still unsure of the units, though, since I'm just doing a naive JTS .length call on the Lines.

fosskers commented 7 years ago

Now to produce actual kilometre distances.

fosskers commented 6 years ago

My use of Haversine is wrong, I'll correct it now.

moradology commented 6 years ago

LGTM