arcgis出图步骤(缩减版)

    public boolean dzjyfbPicture(Map<String, Object> map)
            throws UnknownHostException, IOException {
        try {
        //  参数初始化            
        String sType = (String)map.get("sType");
        String dzjyfb_date = (String)map.get("dzjyfb_date");
        String dzjyfb_year = (String)map.get("dzjyfb_year");
        String pictureName = "0".equals(sType)?dzjyfb_date:dzjyfb_year;//图片名称以日期命名
        String path = ConstantVO.shapeFilePath;
        String name = ConstantVO.shapeFileName;
        String bbox = ConstantVO.exportPictureBbox;
        int width = ConstantVO.exportPictureWidth;
        int height = ConstantVO.exportPictureHeight;
        String pngFile = ConstantVO.exportPictureBasepath + "/"+pictureName+".png";
        //    如果图片已存在,直接返回    
        if(new File(pngFile).exists())return true;
        //    初始化arcgis许可    
        initArcGISLicense();
        //    数据库查询测站和降雨量信息
        Map<String, Double> dyp = findJylData(map);
        //  根据查询的测站和降雨量信息更新shap文件
        updateShapeFile(path, name, dyp);
        //  利用gp工具,将shap文件转为降雨量分布的栅格文件
        createRaster();
        //  将栅格文件加入地图
        com.esri.arcgis.carto.Map esriMap = addRasterToMap();
        //  将地图导出为png图片
        exportMapToImg((IActiveView) esriMap, bbox, pngFile, height, width);
        System.out.println(pngFile);
        //  释放地图(important)
        Cleaner.release(esriMap);
        return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值