是否有一种通用方法可以从不同类型的数据库加载空间数据或将空间数据存储到不同类型的数据库?
我有一个要求,我需要帮助。
我的应用程序用于加载和存储来自不同数据库的数据,这是某种数据集成。数据库可以是 Oracle、MySQL、SQL Server。要考虑的一种可能的数据类型是空间数据类型。众所周知,不同类型的数据库都定义了自己的空间数据类型。例如,我想做的是从SQL Server加载一个空间数据,并将该空间数据保存到Oracle数据库中。
我正在使用Java。我只发现休眠空间似乎能够做类似的事情。我的问题是:
- 是否有任何现有的图书馆可以帮助我执行上述操作?
- 有人有这样的经验可以分享吗?
非常感谢。
I have a requirement that I need help.
My application is for loading and storing data from different databases, which is some kind of data integration. The databases could be Oracle, MySQL, SQL Server. One possible data type to be considered is spatial data type. As we know, different type of database has defined their own spatial data type. What I want to do, for example, is to load one spatial data from SQL Server, and save this spatial data to Oracle database.
I am using Java. And I only find hibernate spatial seems be able to do similar thing. My questions are:
- Is there any existing library that can help me do what above?
- Anyone has such experience to share?
Thanks very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
快速谷歌搜索“Oracle Spatial WKT”、“SQL Server Spatial WKT”和“MySQL Spatial WKT”似乎表明它们都支持 - 你猜对了 - WKT!
这是空间数据的众所周知的文本格式,并且是 OGC 标准。您提到的三个 DBMS 似乎都有从 WKT 字符串存储空间数据类型的功能。您应该能够从一个数据库中以 WKT 形式获取空间数据并将其保存到另一个数据库中。
请注意,您忘记了您真正应该使用的 DBMS - PostGIS...
A quick google of "Oracle spatial wkt", "sql server spatial wkt" and "mysql spatial wkt" seems to show that they all support - you guessed it - WKT!
This is the Well Known Text format for spatial data, and is an OGC standard. The three DBMSs you mention all seem to have functions to store their spatial data types from WKT strings. You should be able to get the spatial data out as WKT from one database and save it to another.
Note you forgot the one DBMS you really should be using - PostGIS...
正如Spacedman所说,如果数据源是WKT格式的JSON,则可以使用 hibernate-spatial 保存它。不管它来自哪里的数据库。
https://drive.google.com/file/d/0B7k8rmEmSGVdVU0weGk4dFV5UFE/view
As Spacedman says, if the data source is a JSON in a WKT format , you can save it with hibernate-spatial . No matter the database where it comes from.
https://drive.google.com/file/d/0B7k8rmEmSGVdVU0weGk4dFV5UFE/view