与在Spatial Db sql server 2008中插入记录有关

时间:2017-01-04 11:18:25

标签: sql sql-server-2008 spatial

HI当我尝试使用以下查询在我的数据库中的一个表中插入记录时,它无法正常工作

insert into T_HTK_ZONES(ZONE_NAME,ZONE_GEOLOCATION) 
    values('TMH',GEOGRAPHY::STGeomFromText('POLYGON((86.17768049240112 22.799901048907312, 86.17795944213867 22.802432999994917, 86.18175745010376 22.802531903379716, 86.18210077285767 22.799584551714144, 86.17946147918701 22.79849658700764, 86.17768049240112 22.799901048907312))', 4326))

这不起作用

但这是有效的

insert into T_HTK_ZONES(ZONE_NAME,ZONE_GEOLOCATION)    
    values('TMH',GEOGRAPHY::STGeomFromText('POLYGON((-122.358 47.653 , -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326))

这是错误。

  

执行用户定义时发生.NET Framework错误   例程或聚合" geography":System.ArgumentException:24200:The   指定的输入不代表有效的地理实例。   System.ArgumentException:at   Microsoft.SqlServer.Types.SqlGeography.ConstructGeographyFro mUserInput(地理数据   g,Int32 srid)at   Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OPE nGisType   type,SqlChars taggedText,Int32 srid)at   Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(SqlCha RS   geometryTaggedText,Int32 srid)

任何人都可以解释

0 个答案:

没有答案