WebGIS development tutorial: Projected coordinate system in GIS

What are the projected coordinate systems?

(1) Mercator projection

The above short video talks about the principle of Mercator projection. You can see that its projection surface is a vertical elliptical cylinder, and the projection surface is consistent with the earth's axis, so it is also called orthoaxial equal angle cutting/cutting. Cylindrical projection.

This means that you can cut a cylinder, which means that the sphere and the elliptical cylinder are cut together; you can also cut the cylinder, that is, the sphere and the elliptical cylinder are cut together. The projection method used by Baidu Maps and Google Maps is Mercator projection.

(2) Gauss-Krüger projection

The Gauss-Krüger projection is also called the Transverse Mercator projection. Its projection surface is an elliptical cylinder. Assuming that the elliptical cylinder is lying perpendicular to the earth's axis, and the projection surface is tangent to it, it is the Transverse Mercator projection. , it can also be called the isometric transverse axis tangent elliptical cylinder projection.

There are three vertical lines, and the middle one is the projection center line. According to different methods, it can be divided into 3-degree zone and 6-degree zone. It should be noted that the starting longitudes of the 3-degree zone and the 6-degree zone are different.

6° zoning method: Starting from the zero longitude of Greenwich, it is divided into a projection zone every 6°, and the world is divided into 60 projection zones.

3° zone method: starting from 1°30′ east longitude, every 3° is a zone, dividing the world into 120 projection zones.

The Gauss-Krüger projection has three main characteristics:

  • After projection, the angle of the map remains unchanged but the area changes. The further away from the central meridian, the greater the area change. This projection is suitable for navigation.

  • The projected elliptical cylinder is horizontal;

  • The projected elliptical cylinder is tangent to the ellipsoid.

my country's topographic maps ranging from 1:25,000 to 1:500,000 use the 6-degree zoning method; topographic maps ranging from 1:5000 to 1:10,000 use the 3-degree zoning method.

(3) Universal Transverse Mercator projection

You may have heard of its nickname: UTM projection. It is very similar to the Gaussian Krüger projection, except that it is a secant cylinder, that is, a sphere is cut by an elliptical cylinder. Therefore, it is also called the transverse equiangular cylindrical projection.

How does a geographical coordinate system measure distance?

(1) Explain from a theoretical perspective

According to the projection type (Mercator projection), geographical coordinates are converted into plane coordinates, and the distance between two points is measured according to a certain algorithm.

(2) Explain from the code perspective

 
 
<script src="https://lib.baomitu.com/Turf.js/latest/turf.min.js"></script>

1. Measurement between two points

var from = turf.point([-75.343, 39.984]); 
var to = turf.point([-75.534, 39.123]); 
var options = { units: 'miles' }; 
var distance = turf.distance(from, to, options); console.log(distance) 

2. Measure the length of the line segment

var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]] ); 
var length = turf.length(line, { units: 'miles' }); 
console.log(length) 

Get free learning materials related to GIS development

Guess you like

Origin blog.csdn.net/jdjxbsus/article/details/133066492