I'm new to PostGIS and looking to measure the distance of the Pacific Crest Trail which spans western North America from Canada to Mexico.
I have a data set containing the lat lon and dates from GPX data taken on the trail from a hiker. I also have a shapefile of the entire trail that's fairly high resolution. What I'd like to do is to extract the total mileage gained for each of the GPS locations from computing the length of the trail data and then intersecting the two.
I think the steps to doing this as are follows:
process the GPS location data to get lat lon positions at weekly intervals with additional special events like summiting Mt Whitney, trail start, end, etc.(this part is finished)
snap the lat lon GPS points to the nearest PCT shapefile nodes.
split the PCT shapefile into segments based on an intersection with the GPS points.
convert the total mileage from meters to miles.
total the distance gained by each GPS point as the dates increase.
Some questions I have are:
What projection or method of measuring distance would be most accurate for such a large north - south distance? I'm thinking of transforming the data into a custom equidistant projection but am unsure about setting the parameters for yielding the most accurate distance measurement. Or does PostGIS have other functionality that would yield accurate distance measurements without having to transform the data?
Does this sound like a reasonable approach? Would you have any suggestions or tips that might help? Any advice you might have would be appreciated.
Thanks in advance