So, I have some coordinates (324753.00N, 0692455.93E) in my KML file, but when I load said file, it defaults the latitude longitude under properties to either (180, 180), or (0, 0). All the other information from the file loads up just fine. I've tried swapping the order I pass them in and that didn't work. I changed the coordinates to 'simpler' numbers (32, 54) and they load up just fine.
I would just assume there was something wrong with the coordinates I have, but if I put them into the field to search by coordinates Google Earth finds the location with no problems.
I've tried a few different 'formats' but every time something different happens.
Any thoughts?
Between something someone below mentioned and the help of a coworker I figured out how to calculate the change. Dummy code belo as an example in case anyone else finds this.
double decimal = Convert.ToDouble(coordinates.Substring(0, coordinates.Length - 8));
double minutes = Convert.ToDouble(coordinates.Substring(coordinates.Length - 8, 2));
double seconds = Convert.ToDouble(coordinates.Substring(coordinates.Length - 6, 2));
double secDecimal = Convert.ToDouble(coordinates.Substring(coordinates.Length - 3, 2));
return Convert.ToString(decimal + (minutes/60) + (seconds/3600) + (secDecimal/360000))
The KML spec requires point coordinates to be in longitude, latitude. See: https://developers.google.com/kml/documentation/kmlreference#point
You appear to be using projected coordinates. You may need to reproject your data into geographic coordinates (WGS84 datum). See the following for ideas on how to reproject your data: https://developers.google.com/kml/articles/vector