/// Converts a projected coordinate to a geographic coordinate. public Coordinates.Coordinate projConvert(Coordinates.Coordinate projCoordinate) { // Make a new point to store the result Coordinates.Coordinate result = new Coordinates.Coordinate(); // Calculate the geographic X coordinate (longitude) result.coordinatePoint.X = (float)(projCoordinate.coordinatePoint.X * ONEOVERWGS84SEMIMAJOR / Math.Cos(0) * RADIANStoDEGREES); // Calculate the geographic Y coordinate (latitude) result.coordinatePoint.Y = (float)(projCoordinate.coordinatePoint.Y * ONEOVERWGS84SEMIMAJOR * RADIANStoDEGREES); result.coordinatePoint.Z = projCoordinate.coordinatePoint.Z;//(float)(projCoordinate.coordinatePoint.Z * ONEOVERWGS84SEMIMAJOR / Math.Cos(0) * RADIANStoDEGREES); result.fix = projCoordinate.fix; return(result); }
/// Converts a projected coordinate to a geographic coordinate. public Coordinates.Coordinate projConvert(Coordinates.Coordinate projCoordinate) { // Make a new point to store the result Coordinates.Coordinate result = new Coordinates.Coordinate(); // Calculate the geographic X coordinate (longitude) result.coordinatePoint.X = (float)(projCoordinate.coordinatePoint.X * ONEOVERWGS84SEMIMAJOR / Math.Cos(0) * RADIANStoDEGREES); // Calculate the geographic Y coordinate (latitude) result.coordinatePoint.Y = (float)(projCoordinate.coordinatePoint.Y * ONEOVERWGS84SEMIMAJOR * RADIANStoDEGREES); result.coordinatePoint.Z = projCoordinate.coordinatePoint.Z;//(float)(projCoordinate.coordinatePoint.Z * ONEOVERWGS84SEMIMAJOR / Math.Cos(0) * RADIANStoDEGREES); result.fix = projCoordinate.fix; return result; }
// Converts a geographic coordinate into a projected coordinate. public Coordinates.Coordinate geoConvert(Coordinates.Coordinate geoCoordinate) { // create new point Coordinates.Coordinate result = new Coordinates.Coordinate(); // calc projected X coordinate result.coordinatePoint.X = (float)(geoCoordinate.coordinatePoint.X * DEGREEStoRADIANS * Math.Cos(0) * WGS84SEMIMAJOR); // calc projected Y coordinate result.coordinatePoint.Y = (float)(geoCoordinate.coordinatePoint.Y * DEGREEStoRADIANS * WGS84SEMIMAJOR); //Z coordinate result.coordinatePoint.Z = geoCoordinate.coordinatePoint.Z;//(float)(geoCoordinate.coordinatePoint.Z * DEGREEStoRADIANS * Math.Cos(0) * WGS84SEMIMAJOR); result.fix = geoCoordinate.fix; // Return the result return(result); }
// Converts a geographic coordinate into a projected coordinate. public Coordinates.Coordinate geoConvert(Coordinates.Coordinate geoCoordinate) { // create new point Coordinates.Coordinate result = new Coordinates.Coordinate(); // calc projected X coordinate result.coordinatePoint.X = (float)(geoCoordinate.coordinatePoint.X * DEGREEStoRADIANS * Math.Cos(0) * WGS84SEMIMAJOR); // calc projected Y coordinate result.coordinatePoint.Y = (float)(geoCoordinate.coordinatePoint.Y * DEGREEStoRADIANS * WGS84SEMIMAJOR); //Z coordinate result.coordinatePoint.Z = geoCoordinate.coordinatePoint.Z;//(float)(geoCoordinate.coordinatePoint.Z * DEGREEStoRADIANS * Math.Cos(0) * WGS84SEMIMAJOR); result.fix = geoCoordinate.fix; // Return the result return result; }
public void setCurrentPos(Coordinates.Coordinate projCoordinate) { currentPosition = projCoordinate.coordinatePoint; }
public static bool deleteAllCoordinates(Coordinates.Coordinate coordinate) { return(true); }