I am using System.Data.Entity.Spatial.DbGeography.FromText()
method to convert the Google map geographical json data to DbGeography
data type to save it into SQL database. Sometimes its throwing the error
"24201: Latitude values must be between -90 and 90 degrees."
Following are the polygon points which I have drawn on United States and its throwing error while conversion:
POLYGON(( 40.6806380252146 -106.8310546875, 40.6639728763869 -93.7353515625, 34.8318411498286 -93.27392578125, 37.9788450404971 -97.84423828125, 35.3890499669117 -98.96484375, 38.3244204270065 -100.43701171875, 35.3173663292379 -102.48046875, 38.5481654230466 -103.60107421875, 35.5143431343182 -104.9853515625, 37.7880813841205 -105.93017578125, 36.6155276313492 -111.26953125, 38.8397076135451 -107.7978515625, 38.685509760012 -111.24755859375, 40.111688665596 -108.74267578125, 38.8568201347436 -105.79833984375, 40.6806380252146 -106.8310546875))
Even its throwing error with below points:
POINT(39.2369068303763 -105.542221069336)