An double value that must be between -180 and 180
Esempio n. 1
0
 public geLatLonAltBox(geAngle90 north, geAngle90 south, geAngle180 east, geAngle180 west)
 {
     North = north;
     South = south;
     East  = east;
     West  = west;
 }
Esempio n. 2
0
 public geLatLonBox(geAngle90 north, geAngle90 south, geAngle180 east, geAngle180 west, geAngle180 rotation)
 {
     North    = north;
     South    = south;
     East     = east;
     West     = west;
     Rotation = rotation;
 }
 public geCoordinates(geAngle90 latitude, geAngle180 longitude, Single altitude)
 {
     Altitude = altitude;
     Latitude = latitude;
     Longitude = longitude;
 }
 /// <summary>
 /// This constructor will pass to the Lat/Lon/Alt constructor
 /// assigning altitude the value of Single.NaN
 /// </summary>
 /// <param name="latitude"></param>
 /// <param name="longitude"></param>
 public geCoordinates(geAngle90 latitude, geAngle180 longitude)
     : this(latitude, longitude, Single.NaN)
 {
 }
Esempio n. 5
0
 public geLatLonAltBox(geAngle90 north, geAngle90 south, geAngle180 east, geAngle180 west)
 {
     North = north;
     South = south;
     East = east;
     West = west;
 }
Esempio n. 6
0
 public geLookAt(geAngle90 latitude, geAngle180 longitude, double range)
 {
     Latitude = latitude;
     Longitude = longitude;
     Range = range;
 }
Esempio n. 7
0
 public geLocation(geAngle90 Lat, geAngle180 Lon, double Alt)
 {
     Latitude  = Lat;
     Longitude = Lon;
     Altitude  = Alt;
 }
Esempio n. 8
0
 public geLookAt(geAngle90 latitude, geAngle180 longitude, double range)
 {
     Latitude  = latitude;
     Longitude = longitude;
     Range     = range;
 }
 public geLocation(geAngle90 Lat, geAngle180 Lon, double Alt)
 {
     Latitude = Lat;
     Longitude = Lon;
     Altitude = Alt;
 }
 public geLatLonBox(geAngle90 north, geAngle90 south, geAngle180 east, geAngle180 west, geAngle180 rotation)
 {
     North = north;
     South = south;
     East = east;
     West = west;
     Rotation = rotation;
 }
 /// <summary>
 /// Passes the constructor on to the N/S/E/W/Rotation
 /// constructor with the Rotation value of 0
 /// </summary>
 /// <param name="north"></param>
 /// <param name="south"></param>
 /// <param name="east"></param>
 /// <param name="west"></param>
 public geLatLonBox(geAngle90 north, geAngle90 south, geAngle180 east, geAngle180 west)
     : this(north,south,east,west,new geAngle180(0))
 {
 }
Esempio n. 12
0
 /// <summary>
 /// Passes the constructor on to the N/S/E/W/Rotation
 /// constructor with the Rotation value of 0
 /// </summary>
 /// <param name="north"></param>
 /// <param name="south"></param>
 /// <param name="east"></param>
 /// <param name="west"></param>
 public geLatLonBox(geAngle90 north, geAngle90 south, geAngle180 east, geAngle180 west)
     : this(north, south, east, west, new geAngle180(0))
 {
 }
Esempio n. 13
0
 public geCoordinates(geAngle90 latitude, geAngle180 longitude, Single altitude)
 {
     Altitude  = altitude;
     Latitude  = latitude;
     Longitude = longitude;
 }
Esempio n. 14
0
 /// <summary>
 /// This constructor will pass to the Lat/Lon/Alt constructor
 /// assigning altitude the value of Single.NaN
 /// </summary>
 /// <param name="latitude"></param>
 /// <param name="longitude"></param>
 public geCoordinates(geAngle90 latitude, geAngle180 longitude)
     : this(latitude, longitude, Single.NaN)
 {
 }
Esempio n. 15
0
        private void processRasterLayer(LayerProperties layerProps, geFolder folder)
        {
            IRasterLayer currentLayer = layerProps.Layeru as IRasterLayer;

            //get coordinates for image :D
            geAngle90 north;
            geAngle90 south;
            geAngle180 east;
            geAngle180 west;
            Double coordlat, coordlong;
            IPoint refPoint;

            refPoint = currentLayer.AreaOfInterest.LowerLeft;

            //coordinate system.
            IGeographicCoordinateSystem gcs;
            SpatialReferenceEnvironment sre = new SpatialReferenceEnvironment();

            //create coordinate system for WGS 84 (Google earth)
            gcs = sre.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);

            //spatial reference
            ISpatialReference pointToSpatialReference;
            pointToSpatialReference = gcs;

            //project point to google earth projection
            refPoint.Project(pointToSpatialReference);

            //and get coordinates
            refPoint.QueryCoords(out coordlong, out coordlat);
            //left = west point and lower = south
            west= new geAngle180(coordlong);
            south = new geAngle90(coordlat);

            //and upper right
            refPoint = currentLayer.AreaOfInterest.UpperRight;

            //project point to google earth projection
            refPoint.Project(pointToSpatialReference);
            //x.ToString("{0:0.00}");

            //and get coordinates
            refPoint.QueryCoords(out coordlong, out coordlat);

            //north and east
            north = new geAngle90(coordlat);
            east = new geAngle180(coordlong);

            //so I have all coordinates, now I create the overlay.
            geGroundOverlay.geLatLonBox latlonbox = new geGroundOverlay.geLatLonBox(north,south,east,west);
            geGroundOverlay overlay = new geGroundOverlay(latlonbox);

            //copy image to current folder...
            string name =  System.IO.Path.GetDirectoryName(Path);
            name = System.IO.Path.Combine(name, currentLayer.Name);
            File.Copy(currentLayer.FilePath, name,true);

               // overlay.Icon.Href = currentLayer.FilePath;
            overlay.Icon = new geIcon(System.IO.Path.GetFileName(name));
            overlay.Name = currentLayer.Name;
            overlay.Description = currentLayer.FilePath;
            overlay.StyleUrl = "#Shape2KMLGeneratedStyle";

            switch (layerProps.AltitudeMode)
            {
                case AltitudeMode.absolute:
                    overlay.AltitudeMode = geAltitudeModeEnum.absolute;
                    overlay.Altitude = layerProps.Altitude;
                    //use altitude from field , do that later...
                    break;
                case AltitudeMode.clampToGround:
                    overlay.AltitudeMode = geAltitudeModeEnum.clampToGround;
                    break;
                case AltitudeMode.relativeToGround:
                    overlay.AltitudeMode = geAltitudeModeEnum.relativeToGround;
                    overlay.Altitude = layerProps.Altitude;
                    //use altitude from field , do that later...
                    break;
                default:
                    break;
            }

            //and add overlay to folder. THAT "simple"
            folder.Features.Add(overlay);
        }