GIS4DEV / GIS4DEV.github.io

Open Source GIScience & GIS for Development
1 stars 12 forks source link

Geodesic Distance Measurements #18

Closed sanjana-roy closed 3 years ago

sanjana-roy commented 3 years ago

I'm a little confused about the requirement for forcing the algorithm to use geodesic distance measurements. The only place where I see this is applicable is in Output Type in the Distance Matrix. Would this have to do with using a Linear distance matrix versus another type?

mtango99 commented 3 years ago

"If the input layer uses a projected coordinate system, that system is used or planar distance calculation. If the input layer uses a geographic coordinate system, the project ellipsoid is used for ellipsoidal distance calculation." (link to Joe's report)

So... I guess we'd have to specify a CRS for both our input and target layers at the beginning of our models? Is there a geodesic CRS that would work across all datasets?

vinfalardeau commented 3 years ago

Yeah this is tricky – I tried reprojecting the input and target layers to WGS 84, but since that's a geographic coordinate system, the distance matrix seems to just ignore it and use whatever is the project ellipsoid. For instance, I ran the model twice, once with WGS 84 as the project ellipsoid and once with GRS 80, and I got slightly different distances. Granted, the differences were about a millionth of meter, but I guess maybe we're stuck with trusting the user to either have the right projected coordinate systems for both layers or the right project ellipsoid?

josephholler commented 3 years ago

Exactly. My best guess after excavating the distance matrix code is that if the input features are in any geographic coordinate system, then the distance calculation will use the project ellipsoid.