-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix:#1218 #1219
Open
OLFDB
wants to merge
29
commits into
navit-gps:trunk
Choose a base branch
from
OLFDB:bookmarkissue
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix:#1218 #1219
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
68afffb
Initial commit
OLFDB 5a0288b
Merge branch 'navit-gps:trunk' into navitori
OLFDB e3cb9c2
Merge pull request #18 from navit-gps/trunk
OLFDB fd91e40
Fix:#1185
OLFDB be87cd3
Fix:#1185
OLFDB a2ffdea
Update after further tests
OLFDB 31c48d4
Update navit.c
OLFDB 90ff624
Update navit.c
OLFDB ae572cc
Revert "Fix:#1185"
OLFDB 57cba4e
Revert "Fix:#1185"
OLFDB 381e544
Merge trunk.
OLFDB 64c5eab
merge trunk
OLFDB be53f3d
Merge branch 'navit-gps-trunk' into navitori
OLFDB 34fcdb9
Taken from wiki and added UTM coordinate description
OLFDB ca0fd3c
Convinience Macro to get projection names in text
OLFDB 7620dc4
Added SIZE enum member to calculate size of enum
OLFDB 5d0bfe0
Changes to fix handling of UTM coordinates.
OLFDB 223b8b3
Changed SIZE to projection_enumsize
OLFDB fb0afeb
Removed unneccessary macro PROJASSTRING
OLFDB 90d36d7
Removed unneccessary enum value projection_enumsize
OLFDB 7c2492a
Use dbg instead of printf again
OLFDB c187fda
Linked new file coordinates.rst
OLFDB d9c0f97
astyle
OLFDB 4f64b74
Update after testing with all coordinate formats. Google Maps included.
OLFDB c3dba1b
Changed to rst format and added Google Maps coordinates description
OLFDB 1167d94
Merge branch 'trunk' into bookmarkissue
OLFDB 55f0c86
Revert "Merge branch 'trunk' into bookmarkissue"
OLFDB 8a3fa0d
Fixes for testcases
OLFDB cf5587b
Fix for testcases
OLFDB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,84 @@ | ||
## Coordinates in Navit | ||
|
||
Various parts of Navit will read geographical coordinates provided as text: | ||
|
||
- the [textfile](https://wiki.navit-project.org/index.php/Textfile) map format | ||
- the "center=" attribute in the configuration file | ||
- some Navit commands (e.g. set_position), which can be invoked via the [internal GUI](https://wiki.navit-project.org/index.php/Internal_GUI) or the [Dbus](https://wiki.navit-project.org/index.php/Dbus) bindings | ||
- the files for bookmarks and last map position (bookmarks.txt and center.txt) | ||
|
||
This page documents the coordinate systems and formats that Navit will accept. | ||
|
||
## Supported coordinate systems and formats | ||
|
||
### Longitude / Latitude in decimal degrees | ||
|
||
Longitude / latitude in degrees can be specified as signed decimal fractions: | ||
|
||
``` | ||
-33.3553 6.334 | ||
``` | ||
|
||
That would be about 33° West, 6° North. Note that in this format longitude comes first. The coordinates are assumed to be based on WGS84 (the coordinate system used by the GPS system, and by practically all common navigation systems). | ||
|
||
### Latitude / Longitude in degrees and minutes | ||
|
||
Latitude / Longitude can also be specified in degress and minutes with compass directions (N/S, E/W): | ||
|
||
``` | ||
4808 N 1134 E | ||
``` | ||
|
||
Latitude and longitude are multiplied by 100, so the position above corresponds to 48°8' N, 11°34' (Munich). | ||
|
||
For greater precision you can write the minutes as decimal fractions: | ||
|
||
``` | ||
4808.2356 N 1134.5252 E | ||
``` | ||
|
||
That is 48°8.2356' N 11°34.5252' E, the center of the Marienplatz in Munich. | ||
|
||
Notes: | ||
|
||
- This format is rather unusual (because it uses arcminutes, but not arcseconds). It is probably easier to just use decimal fractions of degrees. | ||
- The spaces are relevant for parsing. Use exactly one space between the number and the letter N/S/E/W. | ||
|
||
### Cartesian coordinates | ||
|
||
Internally, Navit uses a cartesian coordinate system induced by a Mercator projection. Coordinates are written as hexadecimal integers: | ||
|
||
``` | ||
0x13a3d7 0x5d6d6d | ||
``` | ||
|
||
or specifying a projection: | ||
|
||
``` | ||
mg: 0x13a3d7 0x5d6d6d | ||
``` | ||
|
||
That is again 48°8.2356' N 11°34.5252' E. The part up to and including the colon is optional, it names the projection to use. Possible values: | ||
|
||
- mg - the projection used by Map&Guide (the default) | ||
- garmin - "Garmin" projection (TODO: When would it be useful?) | ||
|
||
This format is used internally by Navit, but is probably not very useful for other purposes. | ||
|
||
### UTM coordinates | ||
|
||
Navit can read coordinates in the [Universal Transverse Mercator coordinate system](http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system) (UTM). | ||
|
||
``` | ||
utm32U: 674499.306 5328063.675 | ||
``` | ||
|
||
``` | ||
utmref32UPU:74499.306 28063.675 | ||
``` | ||
|
||
|
||
|
||
## Development notes | ||
|
||
The coordinates are parsed in function coord_parse() in coord.c. This code is used everywhere where Navit parses coordinates, except for the manual coordinate input in the Internal GUI (which uses its own format and parsing function). |
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 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 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 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just happen now to see that you used markdown instead of reStructuredText which results in no headline found here and not format here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just updated coordinates.rst to be in rst format (at least I choose export reStructuredText in Typora to create it). Added some lines for Google Maps coordinates as well.