ソフトウェアエクスポート結果マップ効果
1. 技術的な実装とアプリケーションの背景
大気汚染は今日世界が直面している深刻な問題です。それは人間の健康に危険をもたらすだけでなく、環境や生態系にも悪影響を及ぼします。多くの地域で大気汚染は日常生活において無視できない問題となっています。
大気汚染の問題は複雑ですが、その影響を軽減するために私たちが取れる対策はいくつかあります。まず、私たちは環境保護に対する意識を高め、環境保護にもっと注意を払う必要があります。それには私たち一人ひとりが責任を負い、二酸化炭素排出量を削減するための行動を起こすことが求められます。たとえば、エネルギー消費を削減するために、車の代わりに自転車を使ったり、歩いたりすることができます。ビニール袋や使い捨て食器など、環境に負荷を与える物の使用も削減できます。
第二に、政府はより厳格な環境規制を制定するための行動も講じるべきです。政府は環境監視を強化し、環境を汚染する企業を罰することができる。政府は、環境保護産業の競争力を向上させるために、環境保護技術の開発と応用を奨励し、支援することもできます。
最後に、大気汚染に共同で取り組むための国際協力を強化する必要もあります。国際協力を通じて、私たちは経験と技術を共有し、地球規模の気候変動と環境汚染に共同で取り組むことができます。協力することによってのみ、世界が直面している共通の問題を解決することができます。
今後、私たちは環境保護にさらに注意を払い、大気汚染に対してより積極的に取り組む必要があります。これは人間の健康に有益であるだけでなく、地球の生態系と環境の保護にも役立ちます。未来の世界のために、より良い明日を創造するために一緒に働きましょう。
大気汚染は今日世界が直面している深刻な問題ですが、それは宇宙に均等に分布しているわけではありません。大気汚染のレベルは地域によって異なり、一部の地域ではより汚染が進んでいます。したがって、さまざまな地域で大気汚染に対処するための的を絞った対策を講じる必要があります。環境保護意識、政府の環境保護規制、環境保護技術の開発と応用、国際協力を強化することにより、大気汚染問題をより効果的に解決し、人間の健康と地球の生態系と環境を保護することができます。
大気汚染は地球規模で深刻な問題ですが、その空間分布は地域によって不均一です。したがって、大気汚染に適切に対処するには、さまざまな地域に合わせた特定のソリューションを開発する必要があります。同時に、環境保護意識の強化、環境保護法規制の実施、環境保護技術の開発促進も重要な対策となります。さらに、国際協力は、大気汚染への対処を改善し、人間の健康と地球の生態環境を保護するのにも役立ちます。大気質補間地図の作成などにより大気汚染の分布をより包括的に把握し、効果的な対策を講じるための科学的根拠を得ることができます。
2. 応用シナリオ
3. 空間地理情報データ処理
国、省、市、地区、および郡の行政区画データを分割します (現在処理されている 3253 ベクトル SHP 形式データ)
4. 空気品質基準の参考
大気質指数 (AQI) 技術規則 (試行版) (HJ633_2012)
5. 達成するための Java コードを作成する
パッケージ cn.AirQuality.air.controller; cn.AirQuality.air.common.HttpUtils をインポートします。 cn.AirQuality.air.common.InterpolationUtils をインポートします。 cn.AirQuality.air.model.StationWithData をインポートします。 com.alibaba.fastjson.JSON をインポートします。 com.alibaba.fastjson.JSONArray をインポートします。 com.alibaba.fastjson.JSONObject をインポートします。 io.swagger.annotations.Api をインポートします。 io.swagger.annotations.ApiOperation をインポートします。 org.springframework.beans.factory.annotation.Value をインポートします。 org.springframework.web.bind.annotation.GetMapping をインポートします。 org.springframework.web.bind.annotation.RequestMapping をインポートします。 org.springframework.web.bind.annotation.RestController をインポートします。 java.io.ファイルをインポートします。 java.util.Listをインポートします。 java.util.Randomをインポートします。 @Api(tags = "数据导出") @RestController @RequestMapping("/api/export") public class ExportController { @Value(value = "${export-path.EDVRURL}") private String EDVRURL; @Value(value = "${export-path.EDVRURL1}") private String EDVRURL1; @Value(value = "${export-path.EDVRRD}") private String EDVRRD; Double TransferDouble(Object v){ try { double vr = Double.valueOf(v.toString()); VRを返します。 } catch (例外 e){ 0 を返します。 @ApiOperation (値 = " EDVR") (値 = "/EDVRVec" public String EDVRVec(String adcd,String dt,String avgType,String要因) { // 获取数据 JSONObject obj = JSON.parseObject("{data:" + HttpUtils.sendGet(EDVRURL1 + "/qEnvgasStationDay/findInterpolationDataList","monitorTime=" + dt.replace(" ", "%20") + "&property=" + avgType + "®ionCode=" + adcd + "&type=1") + "}") ; JSONArray データリスト = (JSONArray)obj.get("データ"); double[][] trainData = new double[datalist.size()][3]; ランダム rdm=新しいランダム(); for (int i = 0; i < datalist.size(); i++) { // StationWithData data = datalist.get(i); trainData[i][0] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("経度")); ブール値 isclip = true; double[] dataInterval = 新しい double[]{0, 50, 100, 150, 200, 300} ; if(avgType.equals("1")){ trainData[i][1] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("緯度")); trainData[i][2] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get(factor)); // trainData[i][2] = TransferDouble(rdm.nextInt(500)); } //D:\gis\china StringboundryFile =EDVRRD + "/" + adcd + "/bound.shp"; int[] サイズ = 新しい int[]{400, 400}; 2340} ; if(factor.equals("so2")){ dataInterval = new double[]{0, 150, 500, 650, 800, 1600} ; if(factor.equals("no2")){ dataInterval = new double[]{0, 100, 200, 700, 1200, 2340} ; ; if(factor.equals("pm25")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} } if(factor.equals("co")){ dataInterval = new double[]{0, 5, 10, 35, 60, 90} ; if(factor.equals("o3")){ dataInterval = new double[]{0, 160, 200, 300, 400, 800} ; if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; if(avgType.equals("2")||avgType.equals ( " 3")){ if(factor.equals("so2")){ dataInterval = new double[]{0, 50, 150, 475 、800、1600} ; if (factor.equals("no2")){ dataInterval = 新しい double[]{0, 40, 80, 180, 280, 565} ; if(factor.equals("co")){ dataInterval = new double[]{0, 2 , 4, 14, 24, 36} ; dataInterval = InterpolationUtils.calEquiSurface(trainData, dataInterval, size,boundryFile (factor.equals("o3")){ dataInterval = 新しい double[]{0, 100, 160, 215, 265, 800} ; if(factor.equals("pm25")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} ; if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; strJson を返し ます 。 } @ApiOperation(value = "EDVR") @GetMapping(value = "/EDVRVec1") public String EDVRVec1(String adcd,String dt,String avgType,String foam,String cityOrStation,String stationIdList) { // 获取データ据 JSONObject obj = JSON.parseObject("{data:" + HttpUtils.sendGet(EDVRURL1 + "/qEnvgasStationDay/findInterpolationDataList","monitorTime=" + dt.replace(" ", " 20") + "&property=" + avgType + "®ionCode=" + adcd + "&cityOrStation=" + cityOrStation + "&stationIdList=" + stationIdList + "&type=1") + "}"); JSONArray データリスト = (JSONArray)obj.get("データ"); double[][] trainData = new double[datalist.size()][3]; ランダム rdm=新しいランダム(); for (int i = 0; i < データリスト。 i++) { // StationWithData データ = datalist.get(i); trainData[i][0] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("経度")); double[] dataInterval = 新しい double[]{0, 50, 100, 150, 200, 300} ; if(avgType.equals("1")){ trainData[i][1] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("緯度")); trainData[i][2] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get(factor)); // trainData[i][2] = TransferDouble(rdm.nextInt(500)); } //D:\gis\china StringboundryFile =EDVRRD + "/" + adcd + "/bound.shp"; int[] サイズ = 新しい int[]{400, 400}; ブール値 isclip = true; if(factor.equals("so2")){ dataInterval = new double[]{0, 150, 500, 650, 800, 1600} ; if (factor.equals("no2")){ dataInterval = 新しい double[]{0, 100, 200, 700, 1200, 2340} ; if(factor.equals("co")){ dataInterval = new double[]{0, 5, 10, 35, 60, 90} ; if(factor.equals("o3")){ dataInterval = new double[]{0, 160, 200, 300, 400, 800} ; if(factor.equals("pm25")){ if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; if(avgType.equals("2")||avgType.equals( " 3")){ if( factor.equals ("so2")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} } dataInterval = new double[]{0, 50, 150, 475, 800, 1600} if(factor.equals("no2")){ dataInterval = new double[]{0, 40, 80, 180, 280, 565} ; if(factor.equals("co")){ dataInterval = new double[]{0, 2 , 4, 14, 24, 36} ; } if(factor.equals("o3")){ dataInterval = new double[]{0, 100, 160, 215, 265, } if(factor.equals("pm25")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; } } String strJson = InterpolationUtils.calEquiSurface(trainData、dataInterval、size、boundryFile、isclip); strJson を返します。 public String InterpolationVec(String adcd,JSONArray datalist,String avgType,String要因) { double[][] trainData = new double[datalist.size()][3]; ランダム rdm=新しいランダム(); for (int i = 0; i < datalist.size(); i++) { // StationWithData data = datalist.get(i); trainData[i][0] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("経度")); trainData[i][1] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("緯度")); trainData[i][2] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get(factor)); // trainData[i][2] = TransferDouble(rdm.nextInt(500)); } //D:\gis\china StringboundryFile =EDVRRD + "/" + adcd + "/bound.shp"; System.out.println(boundryFile); int[] サイズ = 新しい int[]{400, 400}; ブール値 isclip = true; double[] dataInterval = 新しい double[]{0, 50, 100, 150, 200, 300} ; if(avgType.equals("1")){ if(factor.equals("so2")){ dataInterval = 新しい double[]{0, 150, 500, 650, 800, 1600} ; if(factor.equals("no2")){ dataInterval = new double[]{0, 100, 200, 700, 1200, 2340} ; if(factor.equals("co")){ dataInterval = new double[]{0, 5, 10, 35, 60, 90} ; if(factor.equals("o3")){ dataInterval = new double[]{0, 160, 200, 300, 400, 800} ; if(factor.equals("pm25")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} ; if (factor.equals("pm10")){ } = 新しい double[]{0, 50, 150, 250, 350, 420} ; if(avgType.equals("2")||avgType.equals ( " 3")){ if(factor.equals("so2")){ dataInterval = new double[]{0, 50, 150, 475 、800、1600} ; } if(factor.equals("no2")){ dataInterval = new double[]{0, 40, 80, 180, 280, } if(factor.equals("co")){ dataInterval = new double[]{0, 2, 4, 14, 24, 36} ; String InterpolationVec(String adcd,List<StationWithData> datalist ,String avgType,String要因) { } if(factor.equals("o3")){ dataInterval = new double[]{0, 100, 160, 215, 265, } if(factor.equals("pm25")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} ; if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; String strJson = InterpolationUtils.calEquiSurface(trainData, dataInterval, size,boundryFile, isclip) ; strJson を返します。 double [][] trainData = new double[datalist.size()][3]; ランダム rdm=新しいランダム(); for (int i = 0; i < datalist.size(); i++) { StationWithData data = datalist.get(i); trainData[i][0] = data.getLongitude().doubleValue(); trainData[i][1] = data.getLatitude().doubleValue(); trainData[i][2] = data.getAqi().doubleValue(); if(factor.equals("co")){ trainData[i][2] = data.getCo().doubleValue(); if(factor.equals("so2")){ trainData[i][2] = data.getSo2( ) .doubleValue(); trainData[i][2] = data.getNo2().doubleValue() ; if(factor.equals("o3")){ trainData[i] [ 2] = data.getO3().doubleValue(); if (factor.equals("pm10")){ (factor.equals("no2")){ trainData[i][2] = data.getPm10().doubleValue(); if(factor.equals("pm25")){ trainData [ i][2] = data.getPm25().doubleValue(); // trainData[i][2] = TransferDouble(rdm.nextInt(500)); } //D:\gis\china StringboundryFile =EDVRRD + "\\" + adcd + "\\bound.shp"; int[] サイズ = 新しい int[]{400, 400}; dataInterval = new double[]{0, 150, 500, 650, 800, 1600} ; } ブール値 isclip = true; double[] dataInterval = 新しい double[]{0, 50, 100, 150, 200, 300} ; if(avgType.equals("1")){ if(factor.equals("so2")){ if(factor.equals("no2")){ dataInterval = new double[]{0, 100, 200, 700 、1200、2340} ; if(factor.equals("co")){ dataInterval = new double[]{0, 5, 10, 35, 60, 90} ; if(factor.equals("o3")){ dataInterval = new double[]{0, 160, 200, 300, 400, 800} ; } if(factor.equals("pm25")){ dataInterval = new double[]{0, 35, 75, 115, 150, 250} ; } if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; } } if(avgType.equals("2")||avgType.equals("3")){ if(factor.equals("so2")){ dataInterval = new double[]{0, 50, 150, 475, 800 、1600} ; if(factor.equals("no2")){ dataInterval = new double[]{0, 40, 80, 180, 280, 565} ; if(factor.equals("co")){ dataInterval = new double[]{0, 2 , 4, 14, 24, 36} ; if(factor.equals("o3")){ dataInterval = new double[]{0, 100, 160, 215, 265, 800} ; if (因数。 if(factor.equals("pm10")){ dataInterval = new double[]{0, 50, 150, 250, 350, 420} ; String strJson = InterpolationUtils.calEquiSurface(trainData, dataInterval, size,boundryFile, isclip) ; strJson を返します。 } @ApiOperation(value = "EDVR") @GetMapping(value = "/EDVRVecForcast") public String EDVRVecForcast(String adcd,String dt,String要因) {"%20") + "&provinceCode=" + adcd) + "}"); // 取得データデータ JSONObject obj = JSON.parseObject("{data:" + HttpUtils.sendGet(EDVRURL1 + "/homePage/forcastMapAreaData","monitorTime=" + dt.replace(" ", "%20") + "&provinceCode=" + adcd ) + "}"); JSONArray データリスト = (JSONArray)obj.get("データ"); double[][] trainData = new double[datalist.size()][3]; ランダム rdm=新しいランダム(); for (int i = 0; i < datalist.size(); i++) { // StationWithData data = datalist.get(i); trainData[i][0] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get("経度")); trainData[i][1] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)). trainData[i][2] = TransferDouble(((com.alibaba.fastjson.JSONObject)datalist.get(i)).get(factor)); // trainData[i][2] = TransferDouble(rdm.nextInt(300)); } //D:\gis\china StringboundryFile =EDVRRD + "\\" + adcd + "\\bound.shp"; int[] サイズ = 新しい int[]{400, 400}; ブール値 isclip = true; double[] dataInterval = 新しい double[]{0, 50, 100, 150, 200, 300} ; String strJson = InterpolationUtils.calEquiSurface(trainData、dataInterval、size、boundryFile、isclip); strJson を返します。 } @ApiOperation(value = "EDVR管制御数据") @GetMapping(value = "/stationEDVRURLVec") public String stationEDVRURLVec(String adcd,String要因,StringmonitorTime) { // 取得データ据 JSONObject obj = JSON.parseObject(HttpUtils.sendGet(EDVRURL,"monitorTime=" +monitorTime + "®ionCode="+adcd)); JSONArray datalist = (JSONArray)obj.get("data"); return this.InterpolationVec(adcd) ,datalist,"1",factor); } /** * ファイルまたはフォルダーの削除 * @param directory */ public static void delAllFile(File directory){ if (!directory.isDirectory()){ directory.delete(); } else{ File [] files = directory.listFiles(); // 空のファイル フォルダー if (files.length == 0){ directory.delete(); System.out.println("delete" + directory.getAbsolutePath()); return; } // (File file : files){ if (file.isDirectory()){ delAllFile(file); } else { file.delete(); System.out の サブフォルダーとサブファイルを削除します。.println("削除" + file.getAbsolutePath()); } } // フォルダー自体を削除 directory.delete(); System.out.println("Delete" + directory.getAbsolutePath()); } } }
パッケージ cn.AirQuality.air.controller; cn.AirQuality.air.common.DateUtil をインポートします。 cn.AirQuality.air.common.HttpUtils をインポートします。 cn.AirQuality.air.common.geotools.FileFormat をインポートします。 cn.AirQuality.air.common.geotools.Shape2Image をインポートします。 com.alibaba.fastjson.JSON をインポートします。 com.alibaba.fastjson.JSONArray をインポートします。 com.alibaba.fastjson.JSONObject をインポートします。 io.swagger.annotations.Api をインポートします。 org.springframework.beans.factory.annotation.Value をインポートします。 org.springframework.web.bind.annotation.GetMapping をインポートします。 org.springframework.web.bind.annotation.RequestMapping をインポートします。 org.springframework.web.bind.annotation.ResponseBody をインポートします。 org.springframework.web.bind.annotation.RestController をインポートします。 インポート javax.servlet.http.HttpServletRequest; java.io.ファイルをインポートします。 java.util.Dateをインポートします。 java.util.HashMapをインポートします。 java.util.Mapをインポートします。 /** * 图层制御Controller * * @author zdh * @date 2021-03-30 */ @Api(tags = "数据导出") @RestController @RequestMapping("/MapManage/GeoProcess") public class GeoProcessController { private文字列プレフィックス = "MapManage/GeoProcess"; @Value(value = "${export-path.EDVRURL1}") private String EDVRURL1; @Value(value = "${エクスポートパス. * @param adcd line ポジティブ地域化 * @param exportscope 4 をスコープに指定 * @param btime 開始時刻 * @param etime 終了時刻 * @param iWidth 画像幅 * @param iHeight 画像高さ * @param avgType 期間タイプ: 1 時間、2、3 日 * @param 要因 汚染物質要因: aqi、so2、no2 ,co,o3,pm25,pm10 * @param cityOrStation エリア 1、ステーション 2 * @param stationIdList * @param request * @return */ //http://localhost:8915/MapManage/GeoProcess/exportMapByIv?adcd=0&exportscope = 73.501142,6.323421,135.088511,53.560901&btime=2023-05-22 13:00&etime=2023-05-22 14:00&factor=so2&cityOrStation=1&avgType=1&iWidth=800&iHeight=600 @GetMapping ("/export MapByIv" ) @ResponseBody public String importMapByIv(String adcd,String exportscope,String btime,String etime,int iWidth,int iHeight,String avgType,String Factor,String cityOrStation,String stationIdList,HttpServletRequest request) {long start = System.currentTimeMillis( ) ; String cdir=System.getProperty("user.dir"); String bPath = request.getServletContext().getRealPath(""); 日付 dt1=new Date(btime.replace("-","/")); 日付 dt2=new Date(etime.replace("-","/")); 文字列 dts=""; 文字列 imgs=""; while(dt2.compareTo(dt1)>-1){ // System.out.println(bPath); Shape2Image shp2img = 新しい Shape2Image(); shp2img.ClearAllLayer(); "yyyy-MM-dd HH"); imgDt = DateUtil.format(dt1,"yyyyMMdd") 文字列 shpPath3 = EDVRRD + "/"+adcd+"/XZQH.shp"; 文字列 sldPath3 = EDVRRD + "/airsld/sld_XZQH1.sld"; 文字列 shpPath4 = EDVRRD + "/"+adcd+"/XZQHLabel.shp"; 文字列 sldPath4 = EDVRRD + "/airsld/sld_XZQHLabel.sld"; // 文字列 shpPath6 = "sxj/"+adcd+"subtitle.shp"; 文字列 dt=""; 文字列 imgDt=""; if(avgType.equals("1")){ imgDt = DateUtil.format(dt1,"yyyyMMddHH"); dt = DateUtil.format(dt1,"yyyy-MM-dd HH"); if (avgType. 等しい("2")){ dt = DateUtil.format(dt1,"yyyy-MM-dd"); } if(avgType.equals("3")){ imgDt = DateUtil.format(dt1,"yyyyMM"); dt = DateUtil.format(dt1,"yyyy-MM"); if(dt2.compareTo(dt1)==0){ dts = dts + imgDt; imgs = imgs + "/duoyuanronghe/"+adcd+"/img1/"+factor+"/"+avgType+"/G_" + imgDt + ".png"; }else { dts = dts + imgDt + ","; imgs = imgs + "/duoyuanronghe/"+adcd+"/img1/"+factor+"/"+avgType+"/G_" + imgDt + ".png, ファイル4.mkdir(); ファイル file3 = 新しいファイル (EDVRRD + "/"+adcd+"/img1/"+factor); if(!file3.exists()){ file3.mkdir(); ファイルfile2 = 新しい File(EDVRRD + "/"+adcd+"/img1/"+factor+"/"+avgType); if(!file2.exists()){ file2.mkdir(); ファイル file1 = 新しい File(EDVRRD + "/"+adcd+"/img1/"+factor+"/"+avgType+"/"+imgDt) ; if(!file1.exists()){ file1. mkdir(); 文字 列 shpPath2 = EDVRRD + "/"+adcd+"/img1/"+factor+"/"+avgType+"/"+imgDt+"/interpolation.shp"; 列 sldPath2 = EDVRRD + "/airsld/sld_interpolation"+factor+avgType+"。 文字列 geots=""; // geots = HttpUtils.sendGet("http://localhost:8915/api/export/controlEDVRVec","adcd=" + adcd+"&btime="+btime+"&etime="+etime); geots = HttpUtils.sendGet("http://localhost:8915/api/export/EDVRVec1", "adcd=" + adcd + "&dt=" + dt.replace(" ", "%20") + "&avgType= " + avgType+ "&cityOrStation=" + cityOrStation + "&stationIdList=" + stationIdList + "&factor=" +係数); FileFormat.geojson2Shape(geots,shpPath2); // ファイル形式。 //double[] bbox = new double[]{114.810126,34.377357,122.705605,38.399928};山东 //double[] bbox = new double[]{102.458229,29.652697,106.431929,32.136854}; double[] bbox = new double[]{Double.parseDouble(exportscope.split(",")[0]),Double.parseDouble(exportscope.split(",")[1]),Double.parseDouble(exportscope. split(",")[2]),Double.parseDouble(exportscope.split(",")[3])}; paras.put("bbox", bbox); paras.put("幅", iWidth); paras.put("高さ", iHeight); shp2img.addShapeLayer(shpPath2, sldPath2); // shp2img.addShapeLayer(shpPath3, sldPath3); // shp2img.addShapeLayer(shpPath4, sldPath4); shp2img.getMapContent(paras, imgPath); if(avgType.equals("1")){ dt1 = DateUtil.addDateHours(dt1,1); if(avgType.equals("2")){ dt1 = DateUtil.addDateDays(dt1,1); if(avgType.equals("3")){ dt1 = DateUtil.addDateMonths(dt1,1); return "{\"imgs\":\""+imgs+"\" , " + "\"dts\":\""+dts+"\",\"spend\":\"画像生成完了,共消費時間"+(System. public String importMapByIvADCD(String acd,String exportscope,String btime,String etime,int iWidth,int iHeight,String avgType,String 要素, String cdir=System.getProperty("user.dir"); String bPath = request.getServletContext().getRealPath(""); 日付 dt1=new Date(btime.replace("-","/")); 日付 dt2=new Date(etime.replace("-","/")); 文字列 dts=""; 文字列 imgs=""; while(dt2.compareTo(dt1)>-1){ // System.out.println(bPath); Shape2Image shp2img = 新しい Shape2Image(); shp2img.ClearAllLayer(); 文字列 sldPath3 = EDVRRD + "/airsld/sld_XZQH2.sld"; 文字列 shpPath4 = EDVRRD + "/"+adcd+"/XZQHLabel.shp"; 文字列 sldPath4 = EDVRRD + "/airsld/sld_XZQHLabel. 文字列 imgDt=""; if(avgType.equals("1")){ imgDt = DateUtil.format(dt1,"yyyyMMddHH"); dt = DateUtil.format(dt1,"yyyy-MM-dd HH"); if(avgType.equals("2")){ imgDt = DateUtil.format(dt1,"yyyyMMdd") ; dt = DateUtil.format(dt1,"yyyy-MM-dd"); if(avgType.equals( " 3")){ imgDt = DateUtil.format(dt1, dt = DateUtil.format(dt1,"yyyy-MM"); } if(dt2.compareTo(dt1)==0){ dts = dts + imgDt; imgs = imgs + "/duoyuanronghe/"+adcd+"/img2/"+factor+"/"+avgType+"/G_" + imgDt + ".png"; }else { dts = dts + imgDt + ","; imgs = imgs + "/duoyuanronghe/"+adcd+"/img2/"+factor+"/"+avgType+"/G_" + imgDt + ".png,"; ファイル file4 = 新しいファイル (EDVRRD + "/"+adcd+"/img2"); if(!file4.exists()){ file4.mkdir(); ファイル file3 = 新しい File(EDVRRD + "/"+adcd+"/img2/"+factor) ; if(!ファイル3. 存在する()){ file3.mkdir(); } ファイル file2 = 新しいファイル (EDVRRD + "/"+adcd+"/img2/"+factor+"/"+avgType); if(!file2.exists()){ file2.mkdir(); ファイル file1 = 新しい File(EDVRRD + "/"+adcd+"/img2/"+factor+"/"+avgType+"/"+imgDt) ; if(!file1.exists()){ file1.mkdir(); 文字 列 shpPath3 = EDVRRD + "/"+adcd+"/img2/"+factor+"/"+avgType+"/"+imgDt+"/XZQH.shp"; 文字列 imgPath = EDVRRD + "/"+adcd+"/img2/"+factor+"/"+avgType+"/G_" + imgDt + ".png"; JSONObject obj = JSON.parseObject("{data:" + HttpUtils.sendGet(EDVRURL1+"/qEnvgasStationDay/findInterpolationDataList") JSONArray データリスト = (JSONArray)obj.get("データ"); FileFormat.geojsonf2Shape(EDVRRD + "/"+adcd+"/XZQH.json",shpPath3,"レベル",factor+"レベル", datalist,"PAC","regionCode"); // FileFormat.geojsonf2Shape("sxj/"+adcd+"subtitle.json",shpPath6,"NAME","2021年4月13日20時~2021年4月14日20時"); //double[] bbox = new double[]{102.458229,29.652697,106.431929,32.136854}; double[] bbox = new double[]{Double.parseDouble(exportscope.split(",")[0]),Double.parseDouble(exportscope.split(",")[1]),Double.parseDouble(exportscope. split(",")[2]),Double.parseDouble(exportscope.split(", shp2img.addShapeLayer(shpPath3, sldPath3); shp2img.addShapeLayer(shpPath4, sldPath4); shp2img.getMapContent(paras, imgPath); if(avgType.equals("1")){ dt1 = DateUtil.addDateHours(dt1,1); if(avgType.equals("2")){ } if(avgType.equals(" 3 ")){ dt1 = DateUtil.addDateMonths(dt1,1); return "{\"imgs\":\""+imgs+"\" , " + "\"dts\":\""+dts+"\",\"spend\":\"画像生成完了,共消費時間"+(System.
6. 空気質時間の変化の影響をシミュレーションする
それがあなたを助けるなら
テクノロジーの共有をサポートしていただきありがとうございます。QR コードをスキャンして「いいね!」とサポートしてください:
技術協力および交換qq: 2401315930