Пример #1
0
        public override void Initialize()
        {
            this.FullExtent = new
             ESRI.ArcGIS.Client.Geometry.Envelope(-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787);
            {
                SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100);
            };

            this.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100);

            this.TileInfo = new TileInfo()
            {
                Height = 256,
                Width = 256,

                Origin = new ESRI.ArcGIS.Client.Geometry.MapPoint(-20037508.342787, 20037508.342787)
                {
                    SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100)
                },
                Lods = new Lod[19]
            };

            double resolution = 156543.033928;

            for (int i = 0; i < TileInfo.Lods.Length; i++)
            {

                TileInfo.Lods[i] = new Lod() { Resolution = resolution };
                resolution /= 2;
            }

            // Call base initialize to raise the initialization event

            base.Initialize();
        }
Пример #2
0
        public override void Initialize()
        {
            this.FullExtent = new
             Envelope(-20037508.342787,-20037508.342787,20037508.342787,20037508.342787);
            //(-180,-85.0511287798066,180, 85.0511287798066)
            {
                SpatialReference = new  ESRI.ArcGIS.Client.Geometry.SpatialReference(102113);
            };
            this.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102113);
            //this.InitialExtent = this.FullExtent;
            this.TileInfo = new TileInfo()
            {
                Height = 256,
                Width = 256,

            Origin = new ESRI.ArcGIS.Client.Geometry.MapPoint(-20037508.342787,
            20037508.342787)//Origin = new ESRI.ArcGIS.Geometry.MapPoint(-180, 90)
                {
                    SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102113)
                },
                Lods = new Lod[20]
            };

            double resolution = 156543.033928;
            for (int i = 0; i < TileInfo.Lods.Length; i++)
            {
                TileInfo.Lods[i] = new Lod() { Resolution = resolution };
                resolution /= 2;
            }

            base.Initialize();
        }
Пример #3
0
        private static void WriteUnits(ref XmlWriter writer, ref ESRI.ArcGIS.Client.Geometry.SpatialReference spatialReference, ref Configuration configuration)
        {
            writer.WriteStartElement("units");

            writer.WriteElementString("distanceUnits", GeometryUtil.PacketUnitString(configuration.SpatialReferenceUnitsPerMeter));
            writer.WriteElementString("angleUnits", "Degree");
            writer.WriteElementString("directionUnits", "Degree");
            writer.WriteElementString("directionFormat", "north azimuth");

            writer.WriteEndElement();
        }
Пример #4
0
        public override void Initialize()
        {
            this.FullExtent = new
             Envelope(53345.036, 2411683.347, 490618.274, 2813866.758);
             //  Envelope(53345.036, 2411683.347+40, 490618.274, 2813905.52+40);
            {
                SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(104137);
            };
            this.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(104137);
            //this.InitialExtent = this.FullExtent;
            this.TileInfo = new TileInfo()
            {
                Height = 256,
                Width = 256,

                Origin = new ESRI.ArcGIS.Client.Geometry.MapPoint(53345.036,
               2813866.758)//Origin = new ESRI.ArcGIS.Geometry.MapPoint(-180, 90)
                {
                    SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(104137)
                },
                Lods = new Lod[10]
            };

              //<zoom_level level="0" name="level0" description="" scale="358672.0" tile_width="24294.05013333333" tile_height="24294.05013333333"/>
              //<zoom_level level="1" name="level1" description="" scale="141873.0" tile_width="9609.5312" tile_height="9609.5312"/>
              //<zoom_level level="2" name="level2" description="" scale="63949.0" tile_width="4331.478933333333" tile_height="4331.478933333333"/>
              //<zoom_level level="3" name="level3" description="" scale="35993.0" tile_width="2437.9258666666665" tile_height="2437.9258666666665"/>
              //<zoom_level level="4" name="level4" description="" scale="20258.0" tile_width="1372.1418666666666" tile_height="1372.1418666666666"/>
              //<zoom_level level="5" name="level5" description="" scale="11402.0" tile_width="772.2954666666666" tile_height="772.2954666666666"/>
              //<zoom_level level="6" name="level6" description="" scale="6417.0" tile_width="434.6448" tile_height="434.6448"/>
              //<zoom_level level="7" name="level7" description="" scale="3611.0" tile_width="244.58506666666665" tile_height="244.58506666666665"/>
              //<zoom_level level="8" name="level8" description="" scale="1144.0" tile_width="77.48693333333333" tile_height="77.48693333333333"/>
              //<zoom_level level="9" name="level9" description="" scale="644.0" tile_width="43.620266666666666" tile_height="43.620266666666666"/>
            double resolution =94.8984375;
            TileInfo.Lods[0] =new Lod(){  Resolution= 24294.05013333333 / 256};
            TileInfo.Lods[1] = new Lod() { Resolution = 9609.5312 / 256 };
            TileInfo.Lods[2] = new Lod() { Resolution = 4331.478933333333 / 256 };
            TileInfo.Lods[3] = new Lod() { Resolution = 2437.9258666666665 / 256 };
            TileInfo.Lods[4] = new Lod() { Resolution = 1372.1418666666666 / 256 };
            TileInfo.Lods[5] = new Lod() { Resolution = 772.2954666666666 / 256 };
            TileInfo.Lods[6] = new Lod() { Resolution = 434.6448 / 256 };
            TileInfo.Lods[7] = new Lod() { Resolution = 244.58506666666665 / 256 };
            TileInfo.Lods[8] = new Lod() { Resolution = 77.48693333333333 / 256 };
            TileInfo.Lods[9] = new Lod() { Resolution = 43.620266666666666 / 256 };

            //for (int i = 0; i < TileInfo.Lods.Length; i++)
            //{
            //    TileInfo.Lods[i] = new Lod() { Resolution = resolution };
            //    resolution /= 2;
            //}

            base.Initialize();
        }
Пример #5
0
        public override void Initialize()
        {
            this.FullExtent = new

               ESRI.ArcGIS.Client.Geometry.Envelope(-180, -90, 180,90);

               {

                SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(4326);

               };

               this.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(4326);

               this.TileInfo = new TileInfo()

               {

                Height = 256,

                Width = 256,

                Origin = new ESRI.ArcGIS.Client.Geometry.MapPoint(-180,90)

               {

                    SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(4326)

                },

                Lods = new Lod[18]

               };

               double resolution = 1.40625; //1.40625;//0.703125;

               for (int i = 0; i < 18; i++)
               {
               TileInfo.Lods[i] = new Lod() { Resolution = resolution };
               resolution /= 2;

               }
               //TileInfo.Lods[0] = new Lod() { Resolution =0.703125 };

               //TileInfo.Lods[1] = new Lod() { Resolution =0.3515625 };

               //TileInfo.Lods[2] = new Lod() { Resolution =0.17578125 };

               //TileInfo.Lods[3] = new Lod() { Resolution =0.087890625 };

               //TileInfo.Lods[4] = new Lod() { Resolution =0.0439453125 };

               //TileInfo.Lods[5] = new Lod() { Resolution =0.02197265625 };

               //TileInfo.Lods[6] = new Lod() { Resolution =0.010986328125 };

               //TileInfo.Lods[7] = new Lod() { Resolution =0.0054931640625 };

               //TileInfo.Lods[8] = new Lod() { Resolution =0.00274658203124999 };

               //TileInfo.Lods[9] = new Lod() { Resolution =0.001373291015625 };

               //TileInfo.Lods[10] = new Lod() { Resolution =0.0006866455078125 };

               //TileInfo.Lods[11] = new Lod() { Resolution =0.000343322753906249 };

               //TileInfo.Lods[12] = new Lod() { Resolution =0.000171661376953125 };

               //TileInfo.Lods[13] = new Lod() { Resolution =0.0000858306884765626 };

               //TileInfo.Lods[14] = new Lod() { Resolution =0.0000429153442382813 };

               //TileInfo.Lods[15] = new Lod() { Resolution =0.0000214576721191406 };

               base.Initialize();
        }
Пример #6
0
        static string _doubleFormat = "F6"; // XML precision

        static public bool WriteCEXML(ref ParcelData parcelData, string xmlFileName, ref Configuration configuration, ESRI.ArcGIS.Client.Geometry.SpatialReference spatialReference, ref PointDictionary pointDictionary, ref MapPoint projectedStartPoint, double scale, double rotation)
        {
            DocumentEntry documentType = parcelData.DocumentEntries.CurrentItem as DocumentEntry;;

            XmlWriterSettings settings = new XmlWriterSettings();

            settings.Indent          = true;
            settings.IndentChars     = "  ";
            settings.NewLineChars    = "\r\n";
            settings.NewLineHandling = NewLineHandling.Replace;

            XmlWriter writer = XmlWriter.Create(xmlFileName, settings);

            if (writer == null)
            {
                return(false);
            }

            writer.WriteStartDocument();
            writer.WriteStartElement("geodata", "GeoSurveyPacketData", @"http://www.geodata.com.au/schemas/GeoSurvey/ESRI/1.0/");
            writer.WriteElementString("schemaVersion", "2.0");

            WriteUnits(ref writer, ref spatialReference, ref configuration);
            WriteJobParameters(ref writer, ref configuration);
            WritePlans(ref writer, ref parcelData, ref pointDictionary, ref projectedStartPoint, scale, rotation, ref configuration, ref documentType);
            WritePoints(ref writer);
            WriteControl(ref writer);

            writer.WriteEndElement();
            writer.WriteEndDocument();
            writer.Dispose();       // force write of item.

            return(true);
        }