斯潘8
span4
The intention of this article is to show the user how they can create additional metadata with FME so that GeoMedia can interact with the nativeSQL Server空间桌子。
This works with SQL Server 2012 and higher.
来自Intergraph的Chuck的注释:不建议在同一本地空间数据上混合geomedia 2015和早期版本。GeoMedia 2015 uses a different binary format than 2014 and earlier,it is based on Microsoft's binary for SQL Server 2012 or later.一旦在2015年编辑了一个功能类,you cannot use it in an early version of GeoMedia like GeoMedia 2014.
使用“几何SQL Server仓库" Writer in FME:
当FME在SQL Server数据库FME能够生成必要的几何元数据,that makes the new table read/write enabled from the GeoMedia application.
使用“Microsoft SQL Server空间" writer in FME: To write to a SQL Server Native Spatial table,FME creates the spatial table but does not generated the necessary metadata for GeoMedia as this format is native to Microsoft SQL Server Spatial Database.
为了使geomedia具有读/写功能,需要向geomedia元数据表(gfeatures等)添加额外的元数据。默认情况下,FME不会这样做。
SQL Server Spatial-本机空间数据类型
If you have recently moved to SQL Server Spatial or are thinking about it and plan to use the native Spatial data with GeoMedia you will need to be aware of a few additional steps.
您可能会注意到,当您尝试为新的SQL Server本机空间表即Database Utilities不会在对话框中显示“几何”选项卡。BasicallyDatabase Utilities不知道几何类型并忽略它。You can still add the table to the metadata tables but GeoMedia will not display the geographical data from the table as it isn't aware of the geometry data stored with the table.你可以看到桌子,in tabular view,在geomedia中使用“新数据窗口”,而其他第三方应用程序可以识别空间表并按预期显示。
这表示空间表缺少附加的可变长度
column (required by GeoMedia).这是对几何图形的独特要求。
FME创建了新表,但在几何图形中看不到它们。
FMESQL Server空间作者没有能力创建
使geomedia了解任何SQL Server空间表。
Review the "GeoMedia SQL Server空间用户指南" that comes with the用于geomedia 2014的SQL Server空间加载项.It contains a section called "Using Existing Native Spatial Data" that covers the steps required.这是以下说明的来源,我将参考该文档以获取更多信息。
1) GeoMedia requires a column to be added to the new table...
From within MS SQL Server Studio run the following scripts (please edit the table names and columns to match your table name and column names) ex: NOTE: The following script assumes that the native SQL Server Spatial geometry column is called GEOM and the GeoMedia geometry column is called GEOM_GDO,[ID] column refers to the IDENTITY column of your table.
更改表[schema]。[tablename]添加gem_gdo varbinary(max);go然后,2 new triggers to be created on this table...前任:
在插入asbegin后在[schema].[tablename]上创建触发器[tablename_-ins],将set nocount设置为on;如果存在(从插入位置选择空,[geom]为空并插入,[geom_gdo]不为空)开始raiserror('unsupported.不能仅为gdo列指定值,还必须提供本机列值。“,0,1) ROLLBACK TRANSACTION END;END;GOCREATE TRIGGER [tablename_UPG] ON [schema].[tablename]AFTER UPDATE ASBEGIN SET NOCOUNT ON;IF UPDATE([GEOM]) BEGIN IF NOT UPDATE([GEOM_GDO]) BEGIN UPDATE [schema].[tablename] SET [GEOM_GDO] = NULL WHERE EXISTS (SELECT NULL FROM INSERTED WHERE INSERTED.[ID] = [tablename].[ID] END END ELSE IF UPDATE()begin raiserror('不支持。不能仅为gdo列指定值,还必须提供本机列值。“,0,1) ROLLBACK TRANSACTION ENDEND;GO
如本文所示用户指南从Intergraph-一旦列和触发器就位,就可以运行Database Utilities加载geomedia的元数据。You'll need to ensure you runDatabase Utilities从几何图形和SQL Server空间软件加载项from Intergraph has been installed.
这已经用SQL Server 2008进行了测试,Geometia 2014和FME 2015。
我们已经建立了一个工作区-geom-gdoforgeomedia.zip文件)这将帮助您更新现有的SQL Server空间表。此工作区将添加可变长度
列和本地空间表所需的2个触发器。工作区读取包含现有表和列列表的csv文件。
About the CSV File:可以在创建新空间表的同一个FME工作区(使用文本行编写器)中创建csv文件,然后在第二个工作区(如附加的工作区)中使用该文件来更改空间表。Alternatively if you are dealing with existing tables it would be possible to use SQL to return a listing of spatial tables that can then be saved to a text file and used in this workspace.
Unfortunately it is still necessary to use
Database Utilities将表添加到geomedia的元数据表中,以便与元数据交互。
Intergraph现在有一些PL/SQLtools that can help automate and add the necessary metadata to allow for GeoMedia interaction (after the可变长度
列和触发器已添加到表中-请参见上文)。
This is supported on SQL Server 2008 and above.
“gmp空间实用程序-用于geomedia的SQL Server本机空间数据服务器的存储过程”从Intergraph下载Hexagon Support.下载包含数据库包。
These database packages will need to be installed in the SQL Server database where the native spatial tables are stored.
*在发布链接时,链接正在工作。如果链接被破坏,请使用下面的评论部分通知我们。
或者,访问Hexagon支持并搜索标题“gmp空间实用程序-用于geomedia的SQL Server本机空间数据服务器的存储过程”。
After installing the packages it is possible to have your FME workspace call thegmpsetmetadata用于
package and populate the necessary metadata for interaction with GeoMedia.
如果你有什么困难,请告诉我们。
希望这能帮助别人!幸福快乐。
?2019安全亚搏在线软件公司|合法的