Esempio n. 1
0
        private void GetImgData(string url)
        {
            GlobalVariables.acAerial = JsonConvert.DeserializeObject <ACData_Aerial>(htmlRequest.acJson(url));
            string imgPath = htmlRequest.GetImage(GlobalVariables.acAerial.href);
            double width   = Convert.ToDouble(GlobalVariables.acAerial.extent.xmax) - Convert.ToDouble(GlobalVariables.acAerial.extent.xmin);
            double height  = Convert.ToDouble(GlobalVariables.acAerial.extent.ymax) - Convert.ToDouble(GlobalVariables.acAerial.extent.ymin);

            DrawEntity.DrawImg(new Autodesk.AutoCAD.Geometry.Point3d(Convert.ToDouble(GlobalVariables.acAerial.extent.xmin), Convert.ToDouble(GlobalVariables.acAerial.extent.ymin), 0), imgPath, "Img", height, width);
        }
Esempio n. 2
0
        private void GetContourData(string url)
        {
            GlobalVariables.acContour = JsonConvert.DeserializeObject <ACData_Contour>(htmlRequest.acJson(url));
            for (int i = 0; i < GlobalVariables.acContour.features.Count; i++)
            {
                List <Tuple <double, double, double> > contourPts = new List <Tuple <double, double, double> >();
                Tuple <double, double, double>         ContourPtLatLng;

                //for(int j = 0; i < GlobalVariables.acContour.features[i].geometry.paths[0].Count; j++)
                for (int j = 0; j < GlobalVariables.acContour.features[i].geometry.paths[0].Count; j++)
                {
                    double lat;
                    double lng;
                    double elav = GlobalVariables.acContour.features[i].attributes.ELEVATION;
                    lat             = GlobalVariables.acContour.features[i].geometry.paths[0][j][0];
                    lng             = GlobalVariables.acContour.features[i].geometry.paths[0][j][1];
                    ContourPtLatLng = new Tuple <double, double, double>(lat, lng, elav);
                    contourPts.Add(ContourPtLatLng);
                }
                DrawEntity.DrawPlineFrom3PtList("ACEXTRACTOR.CONTOURS", 10, contourPts);
            }
        }