首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >加载ArcGIS数字化图像

加载ArcGIS数字化图像
EN

Stack Overflow用户
提问于 2018-08-01 07:41:16
回答 1查看 198关注 0票数 0

我是地理信息系统的新手。

在我的项目(一个窗口应用程序)中,我试图以PictureBox(一个区域的无人机图像)加载一个关于950+ MB的GeoTIFF格式的图像。这个图像被数字化(标记每所房子的赏金,并贴上房屋编号)和以Shapefile格式导入的数据。我使用以下代码提取XY坐标数据。我将原来的图像大小缩小到大约40-45 MB,并转换成JPG格式。

现在,我必须将XY坐标数据绘制到我的windows应用程序中的新缩减图像上。

我应该如何实现这个场景?我到底该怎么做?我无法加载有关950+ MB的原始图像?

从Shapefile获取XY坐标的代码

代码语言:javascript
复制
private void ReadShapeFile(string path)
{
    ShapeFile.MapFilesInMemory = true;
    // open the shapefile
    EGIS.ShapeFileLib.ShapeFile sf = new EGIS.ShapeFileLib.ShapeFile(path);
    try
    {
        sf.RenderSettings = new EGIS.ShapeFileLib.RenderSettings(path, "", this.Font);
        EGIS.ShapeFileLib.DbfReader dbfr = sf.RenderSettings.DbfReader;
        using (System.IO.StreamWriter writer = new System.IO.StreamWriter("output.txt"))
        {
            EGIS.ShapeFileLib.ShapeFileEnumerator sfEnum = sf.GetShapeFileEnumerator();
            int recordIndex = 0;
            while (sfEnum.MoveNext())
            {
                string rec = "";
                string NoOfCord = "";
                string coord = "";
                rec = string.Format("Record:{0}", recordIndex);
                writer.WriteLine(string.Format("Record:{0}", recordIndex));
                System.Collections.ObjectModel.ReadOnlyCollection<PointD[]> pointRecords = sfEnum.Current;
                foreach (PointD[] pts in pointRecords)
                {
                    writer.Write(string.Format("[NumPoints:{0}]", pts.Length));
                    NoOfCord = string.Format("[NumPoints:{0}]", pts.Length);
                    for (int n = 0; n < pts.Length; ++n)
                    {
                        if (n > 0) writer.Write(',');
                        writer.Write(pts[n].ToString());
                        if (n > 0) coord += ",";
                        coord += pts[n].ToString();
                    }
                    writer.WriteLine();
                }
                AddDataToDataTable(recordIndex, rec, NoOfCord, coord);
                ++recordIndex;
            }
            sfEnum.Dispose();
        }
        MessageBox.Show("Data Loaded Successfully");
    }
    catch (Exception ex) { Debug.WriteLine("Error Message - " + enl + ex.Message + enl + "Error StackTrace - " + enl + ex.StackTrace + enl); }
    finally
    {
        sf.Close();
        sf.Dispose();
    }
}
EN

回答 1

Stack Overflow用户

发布于 2018-09-14 09:35:14

First:加载巨大的图像需要金字塔或瓷砖切割;如果您想要应用程序显示完整的图像,请剪切瓷砖或构建金字塔,然后在dotspatial神差地图库中的映射控制中显示。

第二:如果您没有裁剪图像,则处理后的图像将具有与原始图像相同的真实范围。您可以计算图像中任何像素的真实位置;还可以将真实位置(lat/lon或投影坐标)转换为图像坐标参考(左上角为(0,0))。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51627888

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档