codeforamerica / OpenTrails

OpenTrails (Open Trail System Specification) Converter & Validator
http://open-trails.herokuapp.com/
39 stars 9 forks source link

Preparing data for OpenTrails: 1-to-many trailhead to trail segment relationships #85

Open alanjosephwilliams opened 10 years ago

alanjosephwilliams commented 10 years ago

While the change from "trail_ids" (linking trailheads to _namedtrails.csv) to "segment_ids" (now linking them to _trailsegments.geojson instead) has made associating trailheads with the trail network easier and more consistently accurate, there are still so non-trivial hurdles for those looking to create this association for the first time.

Our current recommendation for those "preparing input data" for the converter is to run a spatial join between their trailheads and trailsegments shapefiles. While a 1:1 spatial join is straightforward, the specification allows for, and many uses cases want to adopt, a 1:many relationship between trailheads and segments.

Currently, GIS users can run a one to many spatial join between TH & TS within a certain distance (say, ~25m). The resulting geodatabase can be exported to a shapefile. The hiccup is that the shapefile ends up with many records for each unique segment—one copy of the trailhead for each association.

The task then is getting the many "segment_ids" into one trailhead record (concatenating all the values, collapsing the records). It is not clear to the OpenTrails team at this point (Trailhead Lab + me) what ESRI/ArcMap tooling exists for this purpose.

Another approach would be to handle this sort of input data at the Converter level. We have sample data on hand if anyone is interested.

thoughts @migurski @ngoldman?

ungoldman commented 7 years ago

sounds good to me 👍