This project uses spatial classes such DbGeography. I managed to recreate the model successfully, but I'm running into problems at runtime.
When accessing to the Latitude property of a DbGeography object retrieved from Database, I first got a NotSupportedException: 'This functionality is not supported by Default spatial service.'. So I digged in docs and found this page http://www.devart.com/dotconnect/oracle ... rvice.html where I found that I needed to use the SharpMap Spatial Service. So I added the required configuration:
Code: Select all
<Devart.Data.Oracle.Entity xmlns="http://devart.com/schemas/Devart.Data.Oracle.Entity/1.0"> <SpatialOptions SpatialServiceType="SharpMap" /> </Devart.Data.Oracle.Entity>
When I tried to run that query again, I received a FileNotFoundExceptio for assembly: 'SharpMap, Version=0.9.4507.23599, Culture=neutral, PublicKeyToken=null', which I was hoping, since I haven't installed the SharpMap package!
So I tried to install the SharpMap package from NuGet. I tried last version 1.1, since it's supported since dotConnect 8.3.115. Sadly, I cannot install this package due to version dependences. SharpMap requires a lot of packages in a precise version, which is incompatible with other packages installed. For example, it requires Newtonsoft.Json = 4.5.11 when WebGrease (a package used in MVC project) requires version >= 5.0.4.
As you can see, this is quite a package hell!. My questions are:
A) It is right that the only way I can use Latitute/Longitude properties and Distance method from DbGeography is using SharpMap? Is there any other way?
B) Do I have to deal with all these packages dependencies problem or there is a way (through manual copying libraries) to make it work?