Bearing angle of UTM projected SpatialLines
On Wed, 25 May 2016, Eduardo Diez wrote:
Dear everyone, I'm used to calculating the compass angles (clockwise from due North) of line features projected in UTM using the tool Linear Directional Mean <http://resources.esri.com/help/9.3/arcgisengine/java/gp_toolref/spatial_statistics_tools/how_linear_directional_mean_spatial_statistics_works.htm> from ArcGIS. I could find functions for performing a similar task but taking Origin -> Destination points and only in Lat/Lon (geographic coordinates) namely: geosphere::bearing and maptools::gzAzimuth. (Somehow they give different results for the same set of points: around 0.05 degrees, maybe because of the trigonometry) Because of the nature of my work it has to be in UTM.
Interesting question. Could you please provide a test set of pairs of coordinates with the fully qualified UTM projection (which datum in particular, and if WGS84, which version - there are several), the output from ArcGIS (which version), and the geographical coordinates you see in ArcGIS (to remove the possibility that it is a projection issue on the R side). They don't need to mean anything, only that they can show us what the problem is in code and numeric terms. A link to an R file and an RDS file would be helpful. Roger
Perhaps someone skillfull in trigonometry can figure it out but i'm not the case. Is there a way to do this in R? Thanks, Eduardo [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 91 00 e-mail: Roger.Bivand at nhh.no http://orcid.org/0000-0003-2392-6140 https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en http://depsy.org/person/434412