dotConnect for Oracle Documentation
In This Topic
    Choosing Spatial Service
    In This Topic

    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.

    Spatial Services, Provided by dotConnect for Oracle

    NetTopologySuite

    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.

    SharpMap

    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.

    Well-Known Text (WKT)

    OracleWktSpatialService class is used. Provider value is a WKT representation (string), which can be used with third-party libraries that support WKT.

    Extended Well-Known Text (EWKT)

    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.

    Well-Known Binary (WKB)

    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.

    OracleObject

    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 Comparison

    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 Yes2 Yes Yes No Yes Yes No
    SharpMap Yes2 Yes Yes No Yes Yes No
    Well-Known Text (WKT) No3 No4 Yes No Yes Yes No
    Extended Well-Known Text (EWKT) No3 Yes Yes No Yes Yes No
    Well-Known Binary (WKB) No3 No4 Yes No Yes Yes No
    OracleObject No3 Yes No Yes Yes Yes Yes

    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.

    See Also

    Default SRID  | Spatial Service Type  | Tolerance  | Area and Distance Units  | Spatials Comparison  | Oracle Spatial Engine  | Spatial Type Name Representation