lv95

Last updated:

0 purchases

lv95 Image
lv95 Images
Add to Cart

Description:

lv95

LV95 / WGS84 conversion #
This package provides conversions between Swiss LV95 (CH1903+) coordinates
and WGS84 coordinates.
Usage #
import 'package:lv95/lv95.dart';

final wgs84 = LatLng(46.93371248052634, 7.120573812162601);
final xy = LV95.fromWGS84(wgs84);
print(xy); // Prints XY(x:1198118.3615880755, y:2575779.6599590005)

final wgs84_2 = LV95.toWGS(xy);
print(wgs84_2); // Prints LatLng(46.93371394740376, 7.120579242285814)
copied to clipboard
The default implementation uses a fast approximation algorithm.
By specifying precise:true you can request the usage of a very
precise but slower algorithm. When using precise calculations you
can further increase the accuracy of the conversion by indicating
the height above sea level of the specified location, in case this
information can be determined by your GNSS receiver or is otherwise
known.
import 'package:lv95/lv95.dart';

final wgs84 = LatLng(46.93371248052634, 7.120573812162601);
final xy = LV95.fromWGS84(wgs84, precise: true, height: 431.3);
print(xy); // Prints XY(x:1198118.3469151012, y:2575779.6827807147)
copied to clipboard
Now the result exactly matches the one given by the official online
converison tool by swisstopo.
Reference #
The calculations used by the library are based on the official formulas given
by the Swiss Federal Office of Topography (swisstopo):

Formulas and constants for the calculation of the Swiss conformal cylindrical
projection and for the transformation between coordinate systems

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.