Oracle Spatial SharpMap : Geometrytype '' is not supported.

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
randoom
Posts: 3
Joined: Thu 27 Jun 2013 20:52

Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by randoom » Thu 27 Jun 2013 21:12

Hello,

I'm evaluating spatial support in dotConnect Oracle (7.7.267.0)

Using Visual Studio 2012 I started a new console application project using .net 4.5
I added an "Devart Entity Model" to my project and generated it from the database (database first)

I have the following code :

Code: Select all

            OracleEntityProviderConfig config = OracleEntityProviderConfig.Instance;
            config.SpatialOptions.SpatialServiceType = SpatialServiceType.SharpMap;

            using (DOTNETEntities entities = new DOTNETEntities())
            {
                var q = from c1 in entities.CITIES
                        from c2 in entities.CITIES
                        where c1.ID == 13 && c2.ID == 14
                        select new
                            {
                                C1 = c1.NAME,
                                C2 = c2.NAME,
                                Distance = c1.GEOMETRY.Distance(c2.GEOMETRY)
                            };

                foreach (var source in q.ToArray())
                {
                    Console.WriteLine(source.Distance); // this works
                }

                CITY cc1 = entities.CITIES.First(c => c.ID == 13); // Geometrytype '' is not supported.
It throws an exception on the last line:

Code: Select all

  Geometrytype '' is not supported. 
at SharpMap.Converters.WellKnownText.GeometryFromWKT.ReadGeometryTaggedText(WktStreamTokenizer tokenizer)
   at SharpMap.Converters.WellKnownText.GeometryFromWKT.Parse(TextReader reader)
   at SharpMap.Converters.WellKnownText.GeometryFromWKT.Parse(String wellKnownText)
   at Devart.Common.Entity.dx.a(Int32 A_0)
What am I doing wrong ?

I tried the example code from "Using Entity Framework Spatials with Oracle Spatial and SharpMap" (http://blogs.devart.com/dotconnect/usin ... rpmap.html) and I get the same error.

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

Re: Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by Shalex » Mon 01 Jul 2013 14:56

We have checked our sample from http://blogs.devart.com/dotconnect/usin ... rpmap.html and the code you have posted (for c.ID == 12) - they both work OK.
randoom wrote: CITY cc1 = entities.CITIES.First(c => c.ID == 13); // Geometrytype '' is not supported.
There are only 12 insert statements for the CITIES table in the DDL/DML script which is available in our "Using Entity Framework Spatials with Oracle Spatial and SharpMap" blog article. Please post here the insert statement for the 13th record you are working with.

randoom
Posts: 3
Joined: Thu 27 Jun 2013 20:52

Re: Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by randoom » Mon 08 Jul 2013 19:46

Sorry, I was on vacation

I have the same exception for IDs<=12
Also same exception in the sample app and with this code too:

Code: Select all

            OracleEntityProviderConfig config = OracleEntityProviderConfig.Instance;
            config.SpatialOptions.SpatialServiceType = SpatialServiceType.SharpMap;

            using (DOTNETEntities entities = new DOTNETEntities())
            {
                CITY city = entities.CITIES.First();
Is there something wrong with my configuration ? :
Im using Oracle Database 11g Express Edition running on a Windows XP VM and I created the tables from the DatabaseInitializationScript.sql script from the demo.
On my development PC: Windows 8, VS 2012 and the latest version of dotConnect trial

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

Re: Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by Shalex » Wed 10 Jul 2013 15:39

randoom wrote:Im using Oracle Database 11g Express Edition
We have reproduced the error with Express Edition of Oracle Server. We will investigate the issue and notify you about the results.

Please give us more details about your environment:
1) the exact version (xx.x.x.x.x) of your Oracle Database 11g Express Edition
2) the target .NET Framework of your project
3) the version of EntityFramework.dll used in your project

randoom
Posts: 3
Joined: Thu 27 Jun 2013 20:52

Re: Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by randoom » Wed 10 Jul 2013 20:12

1) Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
2) .NET 4.5
3) EntityFramework 5.0.0.0

I can confirm that it works with Oracle Database 12c Release 1 Standard Edition

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

Re: Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by Shalex » Tue 16 Jul 2013 16:40

Oracle XE supports spatial functionality only partially. As it turned out, XE doesn't support WKT-representation of spatial data: https://forums.oracle.com/thread/969716 (nothing changed in Oracle 11g R2 XE concerning this issue).

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

Re: Oracle Spatial SharpMap : Geometrytype '' is not supported.

Post by Shalex » Fri 19 Jul 2013 17:06

We have significantly improved Entity Framework Spatials support in the new version of dotConnect for Oracle. For more information, refer to http://forums.devart.com/viewtopic.php?f=1&t=27556.

Post Reply