Oracle Spatial SharpMap : Geometrytype '' is not supported.
Posted: 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 :
It throws an exception on the last line:
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.
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.
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)
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.