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

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

主站蜘蛛池模板: 潍坊市| 宁波市| 普兰店市| 海宁市| 潞西市| 沧源| 施秉县| 汉川市| 左权县| 婺源县| 嘉鱼县| 宣汉县| 合川市| 临高县| 新郑市| 昌邑市| 怀远县| 玉门市| 崇左市| 饶河县| 宁南县| 溧阳市| 乌鲁木齐市| 朔州市| 绍兴市| 翁牛特旗| 襄樊市| 德阳市| 阿拉尔市| 阿尔山市| 建宁县| 兰西县| 延津县| 广东省| 临泽县| 彩票| 修文县| 封开县| 江油市| 横峰县| 三都|