简体   繁体   English

我是否应该将MySQL Geo-Spatial数据类型用于矢量图形

[英]Should I use MySQL Geo-Spatial data types for vector graphics

I am working on a project where I need to store and do computations on SVG paths and points (preferably in MySQL). 我正在一个项目中,我需要在SVG路径和点上存储并进行计算(最好在MySQL中)。 I need to be able to quickly query whether a point lies within a path. 我需要能够快速查询点是否位于路径内。 MySQL's Geo-spatial features seems to support this kind of query with the ST_Within function. MySQL的地理空间功能似乎通过ST_Within函数支持这种查询。

However, I have found 2 opposing claims regarding whether MySQL's Geo-spatial functionality takes into account the 'curvature of the earth'. 但是,对于MySQL的地理空间功能是否考虑了“地球曲率”,我发现了两个相反的主张。 "I understand spatial will factor in the curvature of the earth" and "all calculations are performed assuming Euclidean (planar) geometry as opposed to the geocentric system (coordinates on the Earth's surface)" . “我理解空间将是地球曲率的因素”“所有计算都是在假设欧几里德(平面)几何形状而不是地心系统(地球表面坐标)的情况下进行的” So, my question is which of the claims is true and whether/how does this effect me? 所以,我的问题是,哪些主张是正确的,这是否/对我有何影响?

Also, any general advice on whether I should be taking this approach of storing SVG objects as MySQL Geo-spatial data types is welcome. 此外,欢迎提供关于是否应采用这种将SVG对象存储为MySQL地理空间数据类型的方法的一般建议。

Upon further research, it seems that the second claim is true. 经过进一步研究,似乎第二个说法是正确的。 That is, all computations in MySQL are done without regards to the curvature of the earth and just assumes a flat plane. 也就是说,MySQL中的所有计算均不考虑地球的曲率,而只是假设一个平面。 References: 参考文献:

General advice on whether I should be taking this approach of storing SVG objects as MySQL Geo-spatial data types is still very much welcome. 关于是否应采用这种将SVG对象存储为MySQL地理空间数据类型的方法的一般建议仍然非常受欢迎。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM