wiki:Ru:Help/Concepts/Coordinates

Незавершённый перевод. Исходная англоязычная страница неполная и частично устарела. См. EPSG:4326 и существует модуль proj4 !

Другие языки:

Понятие координат в JOSM

Координаты Openstreetmap

Openstreetmap использует для своих точек координаты (широту/долготу) в геодезическом датуме WGS84 (совместимом с GPS), хранящиеся в десятичном счислении с 7 десятичными разрядами в XML-файлах .osm.

Та же точка на земной поверхности может иметь слегка отличающиеся значения широты/долготы в другой координатной системе, в зависимости от референц-элипсоида и исходного геодезического пункта.

Координаты редактора

Java

Для отображения точек и линий на прямоугольном, плоском экране компьютера, местоположение точек должно быть обратимо преобразовано в прямоугольную систему координат, т.е. с перпендикулярными осями. JOSM использует для процесса отрисовки графический API Java 2D. Java API реализует концепцию пользовательского пространства, которое можно представить как огромный холст с началом координат (0,0) в верхнем левом углу и виртуально бесконечной протяжённостью вправо (x) и вниз (y). Java 2D поддерживает для пары координат (x,y) как целочисленные переменные, так и с плавающей точкой (single или double).

When 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.

Although 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.

JOSM

JOSM defines the coordinates to be used both for Lat/Lon representation as well as the EastNorth editor canvas as double float in the class Coordinate.

LatLon

The class LatLon inherits from Coordinate and provides checks for the legitimate bounds of being within -90,90 for the latitude or -180,180 for the longitude.

EastNorth

The class EastNorth inherits from Coordinate.

east() returns the x and north() returns the y coordinate.

This means that the numerical value of east() increases towards East, while the value of north() decreases towards North.

The class also provides some methods for manipulating the coordinates.

Projection

The reversible mapping from LatLon coordinates to a flat map or the flat computer screen is a 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.

The projections are defined in classes in org.openstreetmap.josm.data.projection.

Using JOSM, the projection can be switched in the Preferences menu. Current versions of JOSM support switching without restart.

When switching projection, the same LatLon coordinate becomes represented as different numerical values of EastNorth.

The bidirectional conversion between LatLon and EastNorth is the core calculation of each implementation of the class Projection. The implementation needs to take care that the valid range of LatLon values is mapped to a valid range of EastNorth values.

Since 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.

Some use cases for projections supported in JOSM are summarised below.

Mercator

The cylindrical Mercator projection, named after its inventor, maps meridians and parallels straight and perpendicular.

In JOSM, e.g. small round objects such as roundabouts appear as a circle, and rectangular buildings are seen rectangular.

Disadvantage is the stretching of the poles to infinity.

Currently Mercator is the standard projection in JOSM.

Most 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).

EPSG:4326

EPSG:4326 is a common Lat/Lon coordinate reference system that refers to WGS84.

(discuss need for WMS servers / Landsat and Yahoo Sat usage)

UTM

The Transverse Mercator projection is an adaptation of the Mercator projection, rotating the cylinder 90°.

The Universal Transverse Mercator (UTM) with its 60 zones, as well as a number of national grid reference systems, are based on this projection.

Within UTM zones or the national grid systems, a reference of 2-dimensional cartesian coordinates can be defined, typically given in Eastings and Northings as a meter value from a particular point of origin. These Eastings and Northings must not be confused with the EastNorth coordinate within JOSM.

Country-specific projections

Many countries specify their own reference systems, some based on Transverse Mercator, some not.

In general, JOSM can support any of these systems as soon as the LatLon to EastNorth conversion has been implemented.

It is planned to have support for PROJ4 library as plugin, which supports lots of transformations.

Last modified 3 years ago Last modified on 2017-11-28T11:30:46+01:00