This topic is applicable to Entity Framework v5 and v6. For Entity Framework Core, see Spatial Data Support for EF Core.
A spatial service is used for reading spatial objects from the database, saving objects to database, working with static and instance methods and properties of the DbGeometry and DbGeography classes.
The NetTopologySuiteSpatialService class is used. It uses NetTopologySuite library.
Provider value is a NetTopologySuite object, which can be used with third-party libraries that support NetTopologySuite (like SharpMap v1 and higher).
This service requires NetTopologySuite.dll, GeoAPI.dll, and PowerCollections.dll assemblies from the NetTopologySuite project website.
This spatial service is considered deprecated. It is not recommended to use in new projects. We recommend using NetTopologySuite spatial service instead.
OracleSharpMapSpatialService class is used. It uses SharpMap v0.9 library.
Provider value is a SharpMap object, which can be used with third-party libraries that support SharpMap 0.9.
This service requires Devart.Data.Oracle.Entity.Spatials.EF5.dll or Devart.Data.Oracle.Entity.Spatials.EF6.dll assembly (for Entity Framework v5 or v6 respectively), which is supplied with dotConnect for Oracle, and SharpMap.dll and ProjNET.dll assemblies from the SharpMap project website.
Note that since SharpMap.dll is unsigned, Devart.Data.Oracle.Entity.Spatials.EF5.dll and Devart.Data.Oracle.Entity.Spatials.EF6.dll assemblies are unsigned too, because it uses SharpMap.dll.
OracleWktSpatialService class is used. Provider value is a WKT representation (string), which can be used with third-party libraries that support WKT.
OracleExtendedWktSpatialService class is used. Provider value is a EWKT (WKT with SRID specified) representation (string), which can be used with third-party libraries that support EWKT.
OracleWkbSpatialService class is used. Provider value is a WKB representation (byte[]), which can be used with third-party libraries that support WKB.
WKB data is compact, so it generates less traffic than WKT or EWKT.
OracleObjectSpatialService class is used. Provider value is a Devart.Data.Oracle.OracleObject class, which can be used with third-party libraries that support OracleObject class.
When using OracleObject service, there is no need to convert data when reading/writing it to database.
Spatial service | DbGeometry and DbGeography | SRID | WellKnownValue support1 | Oracle | Stored procedures and functions | ||
---|---|---|---|---|---|---|---|
9.2/10g R1/XE | 10g R2/11g R1/11g R2 | In params and function return value | Out / InOut params | ||||
NetTopologySuite | 2 | ||||||
SharpMap | 2 | ||||||
Well-Known Text (WKT) | 3 | 4 | |||||
Extended Well-Known Text (EWKT) | 3 | ||||||
Well-Known Binary (WKB) | 3 | 4 | |||||
OracleObject | 3 |
1 DbGeometryWellKnownValue and DbGeographyWellKnownValue data types support (data contract serializable representation of a DbGeometry/DbGeography values).
2 Most features are supported, but not all of them.
3 Minimal feature set is supported. See details in the DbGeometry/DbGeography Support in Spatial Services topic.
4 When persisting data to the database, default SRID values from the GeometryDefaultSrid and GeographyDefaultSrid settings are used. When retrieving SDO_GEOMETRY data from the database, its WKT/WKB representation is retrieved, and SRID is ignored.
See the Spatial Service Type topic to get more information on specifying which spatial service to use.
Default SRID | Spatial Service Type | Tolerance | Area and Distance Units | Spatials Comparison | Oracle Spatial Engine | Spatial Type Name Representation