dotConnect for MySQL Documentation
DbGeometry/DbGeography Support in Spatial Services

This topic is applicable to Entity Framework v5 and v6. For Entity Framework Core, see Spatial Data Support for EF Core.

The following table demonstrates which properties and methods of DbGeometry and DbGeography are supported by available spatial services:

Method/Property Spatial service
Name DbGeometry DbGeography NetTopologySuite1 WKT EWKT WKB
Instance Properties
Area Yes No No No
Boundary Yes No No No
Centroid Yes No No No
ConvexHull Yes No No No
CoordinateSystemId Yes Yes2 Yes Yes2
Dimension Yes No No No
ElementCount Yes No No No
Elevation Yes No No No
EndPoint Yes No No No
Envelope Yes No No No
ExteriorRing Yes No No No
InteriorRingCount Yes No No No
IsClosed Yes No No No
IsEmpty Yes No No No
IsRing Yes No No No
IsSimple Yes No No No
IsValid Yes No No No
Latitude Yes No No No
Length Yes No No No
Longitude Yes No No No
Measure Yes No No No
PointCount Yes No No No
PointOnSurface Yes No No No
ProviderValue Yes Yes Yes Yes
SpatialTypeName Yes No No No
StartPoint Yes No No No
WellKnownValue Yes Yes Yes Yes
XCoordinate Yes No No No
YCoordinate Yes No No No
Instance Methods
AsBinary Yes No No Yes
AsGml Yes No No No
StartPoint Yes No No No
AsText Yes Yes Yes No
Buffer Yes No No No
Contains Yes No No No
Crosses Yes No No No
Difference Yes No No No
Disjoint Yes No No No
Distance Yes No No No
ElementAt Yes No No No
InteriorRingAt Yes No No No
Intersection Yes No No No
Intersects Yes No No No
Overlaps Yes No No No
PointAt Yes No No No
Relate Yes No No No
SpatialEquals Yes No No No
SymmetricDifference Yes No No No
Touches Yes No No No
Union Yes No No No
Within Yes No No No
Static Methods
FromBinary(Byte[]) Yes No No Yes
FromBinary(Byte[], Int32) Yes No No No
FromGml(String) Yes No No No
FromGml(String, Int32) Yes No No No
FromText(String) Yes Yes Yes No
FromText(String, Int32) Yes No No No
GeometryCollectionFromBinary Yes No No No
GeometryCollectionFromText Yes No No No
LineFromBinary Yes No No No
LineFromText Yes No No No
MultiLineFromBinary Yes No No No
MultiLineFromText Yes No No No
MultiPointFromBinary Yes No No No
MultiPointFromText Yes No No No
MultiPolygonFromBinary Yes No No No
MultiPolygonFromText Yes No No No
PointFromBinary Yes No No No
PointFromText Yes No No No
PolygonFromBinary Yes No No No
PolygonFromText Yes No No No

1 The Yes mark in the NetTopologySuite column does not mean the feature is completely supported. It means that NetTopologySuite declares support for it, and it is used by our NetTopologySuite spatial service. However, this feature may not be implemented for some types and cases in the NetTopologySuite library.

2 WKT and WKB spatial services always return config.SpatialOptions.GeometryDefaultSrid for DbGeometry and config.SpatialOptions.GeographyDefaultSrid for DbGeography as CoordinateSystemId.

See Also

Choosing Spatial Service