Can anyone tell me how I can create a DbGeography object of type 'Polygon' from a Collection of DbGeography objects of type 'POINT'
So far I've got this which creates the polygon but I'm missing how the initial step.
1. DbGeography multipoint = DbGeography.MultiPointFromText("MULTIPOINT(53.095124 -0.864716, 53.021255 -1.337128, 52.808019 -1.345367, 52.86153 -1.018524)", 4326)
2. DbGeometry temp_multipoint = DbGeometry.MultiPointFromBinary(multipoint.AsBinary(), 4326)
3. DbGeography polygon = DbGeography.PolygonFromBinary(temp_multipoint.ConvexHull.AsBinary(), 4326); (RESULT)
The problem is creating the initial multipoint geography object from a list of DbGeography(POINTS)
Best Answer
Create each point as a DbGeography object using WKT:
Two things to note:
Hope this helps - I also battled to learn the polygon stuff!
See this article for extra tips on the WKT format: http://en.wikipedia.org/wiki/Well-known_text