Description Usage Arguments Details Value Examples

Latitude and Longitude coordinates are converted to TM projection coordinates with a user-defined central meridian. The resulting units from applying the function are kilometers.

1 |

`cm` |
is the user defined central median. A common choice is the mean of the longitude values in your data set |

`lat` |
is the vector of latitudes |

`lon` |
is the vector of longitudes |

`xcol` |
is the name of the output TM column of x coordinates |

`ycol` |
is the name of the output TM column of y coordinates |

`minx` |
is 'NULL' by default and sets the minimum x-coordinate value to 0. This is an optional minimum value for the x-coordinate vector. |

`miny` |
is 'NULL' by default and sets the minimum y-coordinate value to 0. This is an optional minimum value for the y-coordinate vector. |

This function only should only be used if the coordinates supplied by the user are latitude and longitude. The default TM projection here specifies that both the minimum x and y-coordinate values are 0 scaled to 1 km.

A list with the TM coordinates as the first component of the list. The first component of the list contains x coordinates in the first column and y coordinates in the second column. The remaining elements of the list are the `cm`

, `minx`

, and `miny`

values that were input.

1 2 3 4 5 6 7 8 | ```
## Add transverse Mercator x and y coordinates to a data frame with
## latitude/longitude coordinates. Name these \code{xc_TM_} and \code{yc_TM_}.
exampledataset$xc_TM_ <- LLtoTM(cm = base::mean(exampledataset[ ,"xcoords"]),
lat = exampledataset[ ,"ycoords"],
lon = exampledataset[ ,"xcoords"])$xy[ ,1]
exampledataset$yc_TM_ <- LLtoTM(cm = base::mean(exampledataset[ ,"xcoords"]),
lat = exampledataset[ ,"ycoords"],
lon = exampledataset[ ,"xcoords"])$xy[ ,2]
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.