Spatial linq queries not working

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Sat 20 Nov 2021 11:10

You are working with EF Core 5 and NetTopologySuite 2.1, aren't you?

We will investigate the issue with mapping errors and notify you.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Wed 24 Nov 2021 11:19

The investigation is in progress. As soon as we have any results, we will contact you.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Wed 01 Dec 2021 14:39

* The bug with throwing the "Expression in SQL tree does not have type mapping assigned" error with NetTopologySuite in EF Core is fixed
* The bug with calling methods and properties of the Geometry class and its child classes, when the type member returns bool, with NetTopologySuite in EF Core is fixed

We will notify you when a new public build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Thu 02 Dec 2021 14:40

The NuGet package with the fixes can be downloaded from http://download.devart.com/nuget_oracle_9_14_1399.zip.

If you are interested in getting the licensed installation, contact us via contact form and specify the email used when registering dotConnect for Oracle.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Fri 03 Dec 2021 11:23

Please make sure that the target framework of your project is .NET 5 and you work with EF Core 5.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Tue 07 Dec 2021 15:40

Thank you for your reports. We will investigate all issues and notify you about the results.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Tue 21 Dec 2021 08:57

  • The config.SpatialOptions settings are supported in EF Core
  • The bug with throwing ORA-00920 by the GeometryCollection.Intersects method when using NetTopologySuite spatial service in EF Core 5 is fixed
  • The bug with throwing ORA-00920 by the Geometry.Disjoint method when using NetTopologySuite spatial service in EF Core 3 and EF Core 5 is fixed
  • The bug with throwing the "Unexpected primitive type kind 'r'." error when using NetTopologySuite spatial service with a geometric constant in EF Core 3 and EF Core 5 is fixed
We will notify you when a new public build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Tue 21 Dec 2021 17:14

dotConnect for Oracle 9.15 is released: viewtopic.php?f=1&t=51634.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Tue 21 Dec 2021 17:34

vmakkenz wrote: Thu 18 Nov 2021 10:46 I'm trying to do a simple linq query retrieving the building that contains a point

Code: Select all

        var point = new GeometryFactory().CreatePoint(new Coordinate(233569.922, 556664.502));
        var buildings = db.Building.Where(g => g.Geometry.Contains(point));
But I keep getting mapping errors

System.InvalidOperationException : Expression '@__point_0' in SQL tree does not have type mapping assigned.

Code: Select all

        var buildings = db.Building.Where(g => g.Geometry.Contains(new GeometryFactory().CreatePoint(new Coordinate(233569.922, 556664.502))));
System.InvalidOperationException : Expression 'POINT (233569.922 556664.502)' in SQL tree does not have type mapping assigned.

Using
DevArt 9.14.1369
.NET 5.0/6.0
dotConnect for Oracle v9.15 also includes the following fixes:
  • The bug with throwing the "Expression in SQL tree does not have type mapping assigned" error with NetTopologySuite in EF Core is fixed
  • The bug with calling methods and properties of the Geometry class and its child classes, when the type member returns bool, with NetTopologySuite in EF Core is fixed

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Thu 27 Jan 2022 16:41

The config.SpatialOptions.PreferSpatialOperators configuration option is added (default value is False) to provide the possibility of using spatial operators instead of functions from the SDO_GEOM package.

Refer to viewtopic.php?f=1&t=53190.

Post Reply