ThinkGeo.com    |     Documentation    |     Premium Support

Converting Miles to DecimalDegrees

Hello,


I am creating ellipses and I am given Lat and Long with the radius in miles.  How would I go about converting miles to DecimalRadius?


Thanks, Steven


 Map1.MapUnit = GeographyUnit.DecimalDegree;

 


Feature ellipseFeature = new Feature(new EllipseShape(new PointShape("42.512778", "-88.181944"), cellRadius));


 



 




 


 



 


 



Steven, 
  
 We have an overload to do this. For example, here is the code to create a circle with the center of (42.512778, -88.181944) in Decimal Degree and with the radius of 10 in miles.  
  
 
double cellRadius = 10;
EllipseShape ellipseShape = new EllipseShape(new PointShape(42.512778, -88.181944), cellRadius, cellRadius, GeographyUnit.DecimalDegree, DistanceUnit.Mile);
 
  
 Here is the Width and Height of that ellipseShape 
 ellipseShape.Width : 9.13208057388205 
 ellipseShape.Height: 0.28964541862704957 
  
 Thanks, 
  
 Ben

Thanks Ben…

You are welcome, Steven