SQL Server UNion of geography feature returns FULLGLOBE result?

المشرف العام

Administrator
طاقم الإدارة
I have some trouble with sql server 2012.

I store coordinates of french cities in my database as geography object (with ESRI 4326) and i want to make the UNION of some cities.

I have in result (with the method AsTEXT() ) :

  • If I ask for 100 cities : FULLGLOBE
  • If I ask for 1 cities : I have the good coordinates
There is a limit of how many cities i can union ?

(I do my sql request in c# with ASP .NET MVC 4 :

DbGeography result = System.Data.Spatial.DbGeography.PointFromText("POINT EMPTY", 4326);//PolygonFromText("POLYGON((0 0,0 1,1 0, 0 0))", 4326);; string resultString = "";try{ var commune = db.Communes .Where(com => com.IDCommune.StartsWith("073")) .Select(com => com); foreach(var com in commune) { if (com.coordinates == null) { } else { result = result.Union(com.coordinates); } }Thank you !

EDIT / I solved my problem : i put my polygon in geometry type and not in geography type ans it works =)



أكثر...
 
أعلى