Changes between Initial Version and Version 1 of Ru:Help/Concepts/Coordinates


Ignore:
Timestamp:
2017-11-28T11:30:46+01:00 (8 years ago)
Author:
ak099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Ru:Help/Concepts/Coordinates

    v1 v1  
     1[[TranslatedPages(revision=3,outdated=Незавершённый перевод. Исходная англоязычная страница неполная и частично устарела. См. EPSG:4326 и существует модуль proj4 !)]]
     2[[PageOutline(1-10,Содержание)]]
     3
     4= Понятие координат в JOSM =
     5
     6== Координаты Openstreetmap ==
     7
     8Openstreetmap использует для своих [osmwiki:Data_Primitives#Node точек] координаты (широту/долготу) в [https://ru.wikipedia.org/wiki/Датум геодезическом датуме] [https://en.wikipedia.org/wiki/World_Geodetic_System WGS84] (совместимом с GPS), хранящиеся в десятичном счислении с 7 десятичными разрядами в XML-файлах [osmwiki:.osm .osm].
     9
     10Та же точка на земной поверхности может иметь слегка отличающиеся значения широты/долготы в другой координатной системе, в зависимости от [https://en.wikipedia.org/wiki/Референц-эллипсоид референц-элипсоида] и исходного геодезического пункта.
     11
     12== Координаты редактора ==
     13
     14=== Java ===
     15Для отображения точек и линий на прямоугольном, плоском экране компьютера, местоположение точек должно быть обратимо преобразовано в [https://ru.wikipedia.org/wiki/Прямоугольная_система_координат прямоугольную систему координат], т.е. с перпендикулярными осями. JOSM использует для процесса отрисовки [http://java.sun.com/docs/books/tutorial/2d/overview/index.htm графический API Java 2D]. Java API реализует концепцию [http://java.sun.com/docs/books/tutorial/2d/overview/coordinate.html пользовательского пространства], которое можно представить как огромный холст с началом координат (0,0) в верхнем левом углу и виртуально бесконечной протяжённостью вправо (x) и вниз (y). Java 2D поддерживает для пары координат (x,y) как целочисленные переменные, так и с плавающей точкой (single или double).
     16
     17When displaying an area from this virtual canvas to the limited device space, the screen window in this case, Java internally converts these (x,y) coordinates to screen coordinates, automatically during rendering.
     18
     19Although negative coordinates, going left of or above the (0,0) origin, are theoretically possible, it is not recommended to draw outside of the available screen space, as not all Java version work reliably with points outside of the visible area.
     20
     21=== JOSM ===
     22JOSM defines the coordinates to be used both for Lat/Lon representation as well as the EastNorth editor canvas as '''{{{double float}}}''' in the class [source:/trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java Coordinate].
     23
     24==== LatLon ====
     25The class [source:/trunk/src/org/openstreetmap/josm/data/coor/LatLon.java LatLon] inherits from [source:/trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java Coordinate] and provides checks for the legitimate bounds of being within -90,90 for the latitude or -180,180 for the longitude.
     26
     27==== EastNorth ====
     28The class [source:/trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java EastNorth] inherits from [source:/trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java Coordinate].
     29
     30{{{east()}}} returns the x and {{{north()}}} returns the y coordinate.
     31
     32This means that the numerical value of east() ''increases'' towards East, while the value of north() ''decreases'' towards North.
     33
     34The class also provides some methods for manipulating the coordinates. 
     35
     36=== Projection ===
     37
     38The reversible mapping from LatLon coordinates to a flat map or the flat computer screen is a [https://en.wikipedia.org/wiki/Map_projection projection]. JOSM supports a number of different projections because they have different use cases, in particular in the representation of shapes or the usage of different source material which comes already projected, such as printed maps, land registry data, satellite imagery, WMS servers, etc. to be traced over.  Some WMS servers may support a variety of projections on request, others are limited to a specific one.
     39
     40The projections are defined in classes in [source:/trunk/src/org/openstreetmap/josm/data/projection org.openstreetmap.josm.data.projection].
     41
     42Using JOSM, the projection can be switched in the Preferences menu. Current versions of JOSM support switching without restart.
     43
     44When switching projection, the same LatLon coordinate becomes represented as different numerical values of EastNorth.
     45
     46The bidirectional conversion between LatLon and EastNorth is the core calculation of each implementation of the class [source:/trunk/src/org/openstreetmap/josm/data/projection/Projection.java Projection]. The implementation needs to take care that the valid range of LatLon values is mapped to a valid range of EastNorth values.
     47
     48Since some projections are valid only for certain regions of the earth, the implementation can also define boundaries in which JOSM can edit, i.e. pan the device window over the user space.
     49
     50Some use cases for projections supported in JOSM are summarised below.
     51
     52==== Mercator ====
     53
     54The cylindrical [https://en.wikipedia.org/wiki/Mercator_projection Mercator] projection, named after its inventor,
     55maps meridians and parallels straight and perpendicular.
     56
     57In JOSM, e.g. small round objects such as roundabouts appear as a circle,
     58and rectangular buildings are seen rectangular.
     59
     60Disadvantage is the stretching of the poles to infinity.
     61
     62Currently Mercator is the standard projection in JOSM.
     63
     64Most WMS servers don't support this projection, but JOSM does display EPSG:4326 data also for Mercator projection (which is not completely correct, but the resulting errors are small in the current version of the software).
     65
     66==== EPSG:4326 ====
     67
     68[https://en.wikipedia.org/wiki/EPSG:4326 EPSG:4326] is a common Lat/Lon coordinate reference system that refers to WGS84.
     69
     70(discuss need for WMS servers / Landsat and Yahoo Sat usage)
     71
     72==== UTM ====
     73
     74The [https://en.wikipedia.org/wiki/Transverse_Mercator_projection Transverse Mercator] projection is an adaptation of the Mercator projection,
     75rotating the cylinder 90°.
     76
     77The [https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system Universal Transverse Mercator] (UTM) with its 60 zones, as well as a number
     78of national grid reference systems, are based on this projection.
     79
     80Within UTM zones or the national grid systems, a reference of 2-dimensional cartesian coordinates can be defined,
     81typically given in [https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system#Locating_a_position_using_UTM_coordinates Eastings and Northings]
     82as a meter value from a particular point of origin.  These Eastings and Northings must not be confused with the EastNorth coordinate within JOSM.
     83
     84==== Country-specific projections ====
     85
     86Many countries specify their own reference systems, some based on Transverse Mercator, some not.
     87
     88In general, JOSM can support any of these systems as soon as the LatLon to EastNorth conversion has been implemented.
     89
     90It is planned to have support for PROJ4 library as plugin, which supports lots of transformations.