首页 > 其他 > 详细

arcgis出图步骤(缩减版)

时间:2016-12-27 20:13:10      阅读:433      评论:0      收藏:0      [点我收藏+]
    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;
        }
    }

 

arcgis出图步骤(缩减版)

原文:http://www.cnblogs.com/ys-wuhan/p/6227310.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!