官术网_书友最值得收藏!

General warning - mind the SRID!

Measurement functions come in two variants: planimetric and geodesic. The former operate on a flat surface, while the latter operate on a curved surface (sphere or spheroid). Planimetric functions are robust and computationally cheap (and thus fast to execute), but will yield accurate results if and only if the data is stored in a suitable Cartesian coordinate system. Examples include UTM, State Plane for the US, National Grid for the US and UK, DHDN for Germany, PUWG for Poland, S-JTSK for the Czech Republic, and so on. Geodesic functions, on the other hand, are suited for latitude-longitude coordinates, and consume more resources because of their more complicated formulas, but they work globally.

Trying to use planimetric functions on geodesic coordinates will not result in an error or warning, but will give meaningless results instead. For instance, the distance between Brasilia and Rio de Janeiro in Brazil or Kristiansand in Norway and Espoo in Finland is about 990 kilometers, but 9.1 decimal degrees in the first case and 16.79 decimal degrees in the second. This is because Earth is not flat, and the meridians converge towards the poles. The distance between two meridians is not uniform across the globe, so decimal degrees cannot be used as a reliable unit of measurement.

Attention should be paid to global flat coordinate systems, too. Web Mercator is probably the most notable example, as databases used primarily for web map tile rendering use it. Using planimetric measures in this coordinate system will result in exaggerated results--the closer to the poles, the bigger the distortion. For example, the area of Spain calculated using geodesic function is 507,000 square kilometers, but with Web Mercator it is 873,000 square kilometers (72 percent bigger), and the measurement of Sweden's area is 446,000 square kilometers with the geodesic function and more than 2 million square kilometers with Web Mercator (480 percent distortion!).

主站蜘蛛池模板: 虎林市| 淳化县| 山阳县| 甘南县| 八宿县| 上饶市| 托里县| 金塔县| 芦溪县| 同心县| 陇南市| 新化县| 桐城市| 和田县| 保定市| 长岛县| 思南县| 温泉县| 望城县| 成武县| 肇庆市| 乳山市| 博爱县| 特克斯县| 梅河口市| 墨江| 镇原县| 宁城县| 左贡县| 宝坻区| 张家界市| 安龙县| 石景山区| 南平市| 浦北县| 玛曲县| 垣曲县| 福安市| 兖州市| 玉林市| 六枝特区|