有没有人有关于如何将Oracle Spatial数据移动到Postgres的明确文档(社区版和企业数据库......谢谢
答案 0 :(得分:5)
首先,在Postgres上,您需要安装PostGIS。然后将Oracle表导出到Shapefile(尝试SD02SHP描述here)或to KML。如果您可以将它们导出到shapefile,请按shp2pgsql
每these instructions重新导入到PostGIS。如果使用kml,请使用几何构造函数ST_GeomFromKML重新导入几何体。
答案 1 :(得分:1)
您可以使用ogr2ogr。要连接到Oracle,您需要OSGeo4W的高级安装提供的OCI.dll。
ogr2ogr -a_srs *srs* -overwrite -f "PostgreSQL" -nln *postgis schema*.*postgis table* PG:"host=*postgis host* user=*postgis user* password=*postgis password* dbname=*postgis database*" OCI:"*oracle user*/*oracle password*@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = *hostname*)(PORT = *port number*)))(CONNECT_DATA = (SID =*sid name*))):*oracle schema*.*oracle table*"
srs =采用EPSG格式,例如EPSG:27700
请参阅以下其他链接:
Migrate SPATIAL data from Oracle to Postgresql
http://lists.maptools.org/pipermail/foss-gis-suite/2009-August/000781.html
答案 2 :(得分:0)
您也可以将Oracle中的几何图形作为已知文本导出,然后重新导入它们。这将要求您为表格编写导入语句,这应该很容易创建