Created
October 12, 2012 20:06
-
-
Save rudmark/3881223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This example uses functions in the MightyLittleGeodesy library by Björn Sållarp (C), licensed under the MIT License. | |
using MightyLittleGeodesy.Positions; | |
[...] | |
//Assign WGS84 values | |
WGS84Position wgs84_lat_lon_start = new WGS84Position(59.30,15.30); | |
WGS84Position wgs84_lat_lon_end = new WGS84Position(59.80,16.90); | |
//Convert WGS84 values to SWEREF99 | |
SWEREF99Position sweref99_lat_lon_start = new SWEREF99Position(wgs84_lat_lon_start, SWEREF99Position.SWEREFProjection.sweref_99_tm); | |
SWEREF99Position sweref99_lat_lon_end = new SWEREF99Position(wgs84_lat_lon_end, SWEREF99Position.SWEREFProjection.sweref_99_tm); | |
//Extract lat_start, lat_end, lon_start and _lat_end for SWEREF99 search | |
double sweref99_lat_start = sweref99_lat_lon_start.Latitude; | |
double sweref99_lat_end = sweref99_lat_lon_end.Latitude; | |
double sweref99_lon_start = sweref99_lat_lon_start.Longitude; | |
double sweref99_lon_end = sweref99_lat_lon_end.Longitude; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment