• <i id='bb6yh'><tr id='bb6yh'><dt id='bb6yh'><q id='bb6yh'><span id='bb6yh'><b id='bb6yh'><form id='bb6yh'><ins id='bb6yh'></ins><ul id='bb6yh'></ul><sub id='bb6yh'></sub></form><legend id='bb6yh'></legend><bdo id='bb6yh'><pre id='bb6yh'><center id='bb6yh'></center></pre></bdo></b><th id='bb6yh'></th></span></q></dt></tr></i><div id='bb6yh'><tfoot id='bb6yh'></tfoot><dl id='bb6yh'><fieldset id='bb6yh'></fieldset></dl></div>

  • <legend id='bb6yh'><style id='bb6yh'><dir id='bb6yh'><q id='bb6yh'></q></dir></style></legend>
  • <tfoot id='bb6yh'></tfoot>
      <bdo id='bb6yh'></bdo><ul id='bb6yh'></ul>

        <small id='bb6yh'></small><noframes id='bb6yh'>

      1. 当坐标为长/纬度时,Mysql 几何 AREA() 函数返回什

        时间:2023-08-19
        <legend id='BKUh0'><style id='BKUh0'><dir id='BKUh0'><q id='BKUh0'></q></dir></style></legend>
        <i id='BKUh0'><tr id='BKUh0'><dt id='BKUh0'><q id='BKUh0'><span id='BKUh0'><b id='BKUh0'><form id='BKUh0'><ins id='BKUh0'></ins><ul id='BKUh0'></ul><sub id='BKUh0'></sub></form><legend id='BKUh0'></legend><bdo id='BKUh0'><pre id='BKUh0'><center id='BKUh0'></center></pre></bdo></b><th id='BKUh0'></th></span></q></dt></tr></i><div id='BKUh0'><tfoot id='BKUh0'></tfoot><dl id='BKUh0'><fieldset id='BKUh0'></fieldset></dl></div>
          <tbody id='BKUh0'></tbody>

        • <bdo id='BKUh0'></bdo><ul id='BKUh0'></ul>
            <tfoot id='BKUh0'></tfoot>

              <small id='BKUh0'></small><noframes id='BKUh0'>

                  本文介绍了当坐标为长/纬度时,Mysql 几何 AREA() 函数返回什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我的问题与 这个类似的,它链接到一个非常复杂的解决方案 - 但我想了解的是这个结果:

                  My question is somewhat related to this similar one, which links to a pretty complex solution - but what I want to understand is the result of this:

                  使用 Mysql Geometry 字段存储我适当运行的小多边形

                  Using a Mysql Geometry field to store a small polygon I duly ran

                  select AREA(myPolygon) where id =1 
                  

                  在它上面,得到一个像 2.345 这样的值.那么谁能告诉我,当存储的值是描述多边形的长/纬度集时,这个数字代表什么?

                  over it, and got an value like 2.345. So can anyone tell me, just what does that number represent seeing as the stored values were long/lat sets describing the polygon?

                  仅供参考,我工作的区域相对较小(停车场等),而且区域不必很精确 - 我不会关心地球的曲率.

                  FYI, the areas I am working on are relatively small (car parks and the like) and the area does not have to be exact - I will not be concerned about the curvature of the earth.

                  2.345 什么?谢谢,这让我很烦.

                  2.345 of what? Thanks, this is bugging me.

                  推荐答案

                  简短的回答是面积计算的单位基本上没有意义([deg lat diff] * [deg lon diff]).即使地球的曲率不会在面积计算中起作用(因为您的面积很小"),但它确实在计算纬度/经度多边形坐标之间的距离时起作用.

                  The short answer is that the units for your area calculation are basically meaningless ([deg lat diff] * [deg lon diff]). Even though the curvature of the earth wouldn't come into play for the area calculation (since your areas are "small"), it does come into play for the calculation of distance between the lat/lon polygon coordinates.

                  由于距离赤道的距离不同,经度也不同 (http://en.wikipedia.org/wiki/Longitude#Degree_length),实际上没有将您的区域直接转换为 m^2 或 km^2.它取决于赤道北/南的距离.

                  Since a degree of longitude is different based on the distance from the equator (http://en.wikipedia.org/wiki/Longitude#Degree_length), there really is no direct conversion of your area into m^2 or km^2. It is dependent on the distance north/south of the equator.

                  如果你总是有矩形多边形,你可以只存储对角坐标并使用这样的东西计算面积:PHP 库:计算给定 lat/lng 位置的边界框

                  If you always have rectangular polygons, you could just store the opposite corner coordinates and calculate area using something like this: PHP Library: Calculate a bounding box for a given lat/lng location

                  最正确"的做法是使用 XY(米)坐标(可能是 UTM 使用 WGS-84 椭球体)存储多边形,可以使用以下各种库从 lat/lon 计算出 Java:Java,将纬度/经度转换为 UTM.然后您可以继续使用 MySQL AREA() 函数.

                  The most "correct" thing to do would be to store your polygons using X-Y (meters) coordinates (perhaps UTM using the WGS-84 ellipsoid), which can be calculated from lat/lon using various libraries like the following for Java: Java, convert lat/lon to UTM. You could then continue to use the MySQL AREA() function.

                  这篇关于当坐标为长/纬度时,Mysql 几何 AREA() 函数返回什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在不同的行上选择满足不同条件的值? 下一篇:在 MySQL 中创建一个带有可选参数的函数

                  相关文章

                  最新文章

                  1. <i id='JZczw'><tr id='JZczw'><dt id='JZczw'><q id='JZczw'><span id='JZczw'><b id='JZczw'><form id='JZczw'><ins id='JZczw'></ins><ul id='JZczw'></ul><sub id='JZczw'></sub></form><legend id='JZczw'></legend><bdo id='JZczw'><pre id='JZczw'><center id='JZczw'></center></pre></bdo></b><th id='JZczw'></th></span></q></dt></tr></i><div id='JZczw'><tfoot id='JZczw'></tfoot><dl id='JZczw'><fieldset id='JZczw'></fieldset></dl></div>
                    <tfoot id='JZczw'></tfoot>
                    <legend id='JZczw'><style id='JZczw'><dir id='JZczw'><q id='JZczw'></q></dir></style></legend>

                      <bdo id='JZczw'></bdo><ul id='JZczw'></ul>
                  2. <small id='JZczw'></small><noframes id='JZczw'>