コード例 #1
0
        /// 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);
        }
コード例 #2
0
ファイル: PlateCaree.cs プロジェクト: mnieznalska/mobmap
        /// 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;
        }
コード例 #3
0
        // 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);
        }
コード例 #4
0
ファイル: PlateCaree.cs プロジェクト: mnieznalska/mobmap
        // 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;
        }
コード例 #5
0
ファイル: Map3dDraw.cs プロジェクト: mnieznalska/mobmap
 public void setCurrentPos(Coordinates.Coordinate projCoordinate)
 {
     currentPosition = projCoordinate.coordinatePoint;
 }
コード例 #6
0
 public static bool deleteAllCoordinates(Coordinates.Coordinate coordinate)
 {
     return(true);
 }