我非常确定我想要使用SqlGeometry数据类型在数据库中存储一组多边形。SqlGeometry类型在C#和WPF中是否可以互操作?可以直接将SqlGeometry转换为形状或路径吗?
其次,是否可以在单个SqlGeometry列中存储多个多边形?
发布于 2011-06-16 14:57:01
此链接显示如何在C#中以可视方式查看SqlGeometry:http://www.codeproject.com/KB/database/sqlgeometry.aspx
此链接显示如何在C#中操作SqlGeometry数据类型:http://www.nickharris.net/tag/geometry-data-type/
关于每个SqlGemotry列有多个多边形,我不认为您可以这样做,它是per:http://barendgehrels.blogspot.com/2011_04_01_archive.html,它将多个几何图形转换为一个SqlGeometry列表。
发布于 2012-03-24 00:44:50
SqlGeometry和WPF Geometries是两个独立的库。您需要进行转换。
每列只能存储一个几何图形,但一个几何图形可以是MultiPolygon或GeometryCollection。这两种方法都可以在一列中存储更多多边形。所以,是的。
https://stackoverflow.com/questions/6366432
复制相似问题