-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
padanyi-gulyasg
committed
Feb 18, 2020
0 parents
commit b762fb7
Showing
16 changed files
with
957 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.dart text eol=lf | ||
*.yaml text eol=lf | ||
*.md text eol=lf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Files and directories created by pub | ||
.dart_tool/ | ||
.packages | ||
.pub | ||
# Remove the following pattern if you wish to check in your lock file | ||
pubspec.lock | ||
|
||
# Conventional directory for build outputs | ||
build/ | ||
|
||
# Directory created by dartdoc | ||
doc/api/ | ||
|
||
# IDE | ||
.project | ||
.settings | ||
.idea | ||
*.iml | ||
|
||
# Temp files | ||
*~ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: fabeb2a16f1d008ab8230f450c49141d35669798 | ||
channel: beta | ||
|
||
project_type: package |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [{ | ||
"name": "Dart", | ||
"program": "example/mgrs_dart_example.dart", | ||
"request": "launch", | ||
"type": "dart" | ||
}] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## [0.0.1] - TODO: Add release date. | ||
|
||
* TODO: Describe initial release. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TODO: Add your license here. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# mgrs_dart | ||
|
||
Utility for converting between WGS84 lat/lng and MGRS coordinates (Dart version of [proj4js/mgrs](https://github.com/proj4js/mgrs)). | ||
|
||
Has 3 methods | ||
|
||
- forward, takes an array of `[lon,lat]` and optional accuracy and returns an mgrs string | ||
<!-- - inverse, takes an mgrs string and returns a bbox. --> | ||
- toPoint, takes an mgrs string, returns an array of '[lon,lat]' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Defines a default set of lint rules enforced for | ||
# projects at Google. For details and rationale, | ||
# see https://github.com/dart-lang/pedantic#enabled-lints. | ||
include: package:pedantic/analysis_options.yaml | ||
|
||
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints. | ||
# Uncomment to specify additional rules. | ||
# linter: | ||
# rules: | ||
# - camel_case_types | ||
|
||
analyzer: | ||
# exclude: | ||
# - path/to/excluded/files/** |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:mgrs_dart/mgrs_dart.dart'; | ||
|
||
void main() { | ||
List<double> point = [-115.08209766323476, 36.236123461597515]; | ||
String mgrsString = '11SPA7234911844'; | ||
int accuracy = 5; | ||
|
||
var calculatedPoint = Mgrs.toPoint(mgrsString); | ||
print('Mgrs.toPoint($mgrsString) = $calculatedPoint'); | ||
|
||
var calculatedMgrsString = Mgrs.forward(point, accuracy); | ||
print('Mgrs.forward($point, $accuracy) = $calculatedMgrsString'); | ||
|
||
// var calculatedBox = Mgrs.inverse(mgrsString); | ||
// print(calculatedBox); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
library mgrs_dart; | ||
|
||
export 'package:mgrs_dart/src/classes/bbox.dart'; | ||
export 'package:mgrs_dart/src/classes/lonlat.dart'; | ||
export 'package:mgrs_dart/src/classes/utm.dart'; | ||
export 'package:mgrs_dart/src/mgrs.dart'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class BBox { | ||
double top; | ||
double bottom; | ||
double right; | ||
double left; | ||
|
||
BBox({double top, double bottom, double right, double left}) | ||
: top = top, | ||
bottom = bottom, | ||
right = right, | ||
left = left; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class LonLat { | ||
double lon; | ||
double lat; | ||
|
||
LonLat({double lon, double lat}) | ||
: lon = lon, | ||
lat = lat; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class UTM { | ||
double easting; | ||
double northing; | ||
String zoneLetter; | ||
int zoneNumber; | ||
int accuracy; | ||
|
||
UTM( | ||
{double easting, | ||
double northing, | ||
String zoneLetter, | ||
int zoneNumber, | ||
int accuracy}) | ||
: easting = easting, | ||
northing = northing, | ||
zoneLetter = zoneLetter, | ||
zoneNumber = zoneNumber, | ||
accuracy = accuracy; | ||
} |
Oops, something went wrong.