zoukankan      html  css  js  c++  java
  • andriod arcgis加载影像TIF

      private static final String TAG = "MainActivity";
        private MapView mapView = null;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
    
            this.mapView = (MapView)this.findViewById(R.id.map);
            String rasterPath = Environment.getExternalStorageDirectory().getPath() +"/ArcGIS/samples/Raster/QL_IMage.tif"; //QL_IMage.tif,Landsat8Hawaii_naturecolor.tif
    
            FileRasterSource rasterSource =null;
            try {
                rasterSource = new FileRasterSource(rasterPath);
            } catch (IllegalArgumentException ie) {
                Log.d(TAG, "null or empty path");
            } catch (FileNotFoundException fe) {
                Log.d(TAG, "raster file doesn't exist");
            } catch (RuntimeException re) {
                Log.d(TAG, "raster file can't be opened");
            }
    
            RasterLayer rasterLayer = new RasterLayer(rasterSource);
            this.mapView.addLayer(rasterLayer);
  • 相关阅读:
    7.Mongodb安全性流程
    6.Mongodb索引
    5.Mongodb聚合
    8-进程管理
    7-安装包管理
    6-文件系统
    5-权限用户组
    27-ATM+购物车程序
    26.本章小结
    名词解释
  • 原文地址:https://www.cnblogs.com/gisoracle/p/5247407.html
Copyright © 2011-2022 走看看