Support Spatial Data Types on SQL Server and SQLite
how to use Spatial Data types (e.g. DbGeography) in model (code-first method) to save points, shapes etc.
e.g.
public DbGeography gps_points {get; set;}
i'm unable to use "DbGeography".
@vijayantkatyal are you asking about EF Core?
I have the same Question. I am trying to use the DbGeometry datatype, but it is unavailable with EF Core, neither System.Data.Entity.Spatial nor System.Data.Spatial are referable.
Partially covered by https://github.com/aspnet/EntityFramework/issues/242 but we probably also want to look at built-in support for spatial types.
@rowanmiller sorry for late response. yes i'm asking about EF Core.
+100000. We make extensive use of spatial data in our applications.
I know you guys aren't working on this at the moment, but what are the chances that you'll be reusing types and concepts from EF6's System.Data.Entity.Spatial namespace?
I'm asking because there's some interest in working on this namespace and I'd like to have an idea (if possible) as to whether that will be useful going forward...
cc @rossini-t
@roji At the moment, I don't think we intend to put a common abstraction over it. Instead we would light-up provider-specific types like SqlGeography leveraging the work of #242.
OK thanks.
Note that this mean it will no longer be possible to write provider-independent code that manipulates spatial DB values (as was possible in EF6). I have no idea to what extent spatial support across databases (SqlServer, PostGIS, etc.) overlaps, so this may or may not be a big loss.
Then again with the EF Core approach a common spatial abstraction seems to be a problem outside of EF's domain - as long as #242 allows for reading/writing the provider-specific spatial types a common abstraction may or may not be used afterwards.
Any news about Spatial types in EF Core?
I'd also love an update -- it's a blocker for EF Core, ASP.NET Core and .Net Core for us. Can't wait to try out the new toys though!
Spatial data type support will happen post initial RTM of EF Core (i.e. after the 7.0.0 release). This is purely due to how much work we can achieve between now and RTM and not because we think this scenario is unimportant.
Tks for answer @rowanmiller...
it seems we have no way but waiting for next release of EF Core to include and support the Spatial types
Just a vote for basic DbGeography support.
Our application (like many others I am sure) relies on the DbGeography datatype mapping to the geography type in SQL Server.
Very disappointing that an actual datatype, fully supported by EF6, would be de-prioritized for EF Core. There isn't even a mention of it in the roadmap.
Please don't let this one slip through the cracks.
So what can we do now to use spatial types from EF Core? Will creating a type mapper to Well-Known text work?
Also a vote here for some DbGeography support!
Speaking from a PostgreSQL perspective, if and when you do tackle the problem of spatial data it's extremely important to do so with a cross-provider vision. EF6's spatial types, just like most other things in EF6, were designed to work with SqlServer's spatial support and don't necessarily capture what PostgreSQL's PostGIS allows - so a provider-independent abstraction such as DbGeography may not work well here.
Am far from being an expert here but it's important not to rush into this without comparing spatial support in different databases etc.
Any Timeline to support DbGeography or DbGeometry?
It is in the roadmap: https://github.com/aspnet/EntityFramework/wiki/Roadmap
"High priority features" means "lowest priority" of the list?