且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

几何列:STGeomFromText 和 SRID(什么是 SRID?)

更新时间:2023-02-11 08:39:23

所以我昨天最终与一位前军人交谈,他是一名雷达/测绘专家.基本上,他确切地知道那个数字(4326)是什么,它来自哪里,以及它为什么在那里.

So I ended up talking with an ex-military guy yesterday who was a radar/mapping specialist. Basically, he knew exactly what that number (4326) was, where it came from, and why it is there.

它是计算地理的行业标准.问题是地球不是一个完美的球体(它在中间凸出),而 SRID 4326 说明了这一点.

It is an industry standard for computing geography. The problem is that the earth is not a perfect sphere (it bulges in the middle), and SRID 4326 accounts for that.

正如我所说,表 sys.spatial_reference_systems 列出了所有代码及其内容.但简而言之,除非您有非常具体的理由使用不同的东西,否则您实际上只会使用 4326.

As I stated, the table sys.spatial_reference_systems lists all of the code and what they are. But the short version is that you are really only going to use 4326 unless you have a very specific reason to use something different.