91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 60KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-14
  • 語(yǔ)言: 其他
  • 標(biāo)簽: CAD標(biāo)注??

資源簡(jiǎn)介

CAD格式的數(shù)據(jù)在外業(yè)數(shù)據(jù)采集后的主要成果之一,但是經(jīng)常遇到要將CAD的標(biāo)注信息作為GIS地理要素的屬性字段,如果數(shù)據(jù)量比較少,添加對(duì)應(yīng)屬性,并且照著地理位置進(jìn)行手工填寫,尚且可以接受,但是大數(shù)據(jù)量的地理要素要進(jìn)行屬性賦值時(shí),就會(huì)耗費(fèi)大量的人力物力,因此本人開發(fā)了一個(gè)小工具可自動(dòng)的將cad標(biāo)注賦值給arcgis的地理要素。

資源截圖

代碼片段和文件信息

package?application;

import?java.io.FileOutputStream;
import?java.text.ParseException;
import?java.text.SimpleDateFormat;
import?java.util.ArrayList;
import?java.util.List;

import?org.apache.poi.hssf.usermodel.HSSFCell;
import?org.apache.poi.hssf.usermodel.HSSFCellstyle;
import?org.apache.poi.hssf.usermodel.HSSFRow;
import?org.apache.poi.hssf.usermodel.HSSFSheet;
import?org.apache.poi.hssf.usermodel.HSSFWorkbook;

public?class?ExportToExcel?{
private?List?info;
public??void?CreateExcel()?throws?ParseException{

????????//?第一步,創(chuàng)建一個(gè)webbook,對(duì)應(yīng)一個(gè)Excel文件
????????HSSFWorkbook?wb?=?new?HSSFWorkbook();
????????//?第二步,在webbook中添加一個(gè)sheet對(duì)應(yīng)Excel文件中的sheet
????????HSSFSheet?sheet?=?wb.createSheet(“河道數(shù)據(jù)“);
????????//?第三步,在sheet中添加表頭第0行注意老版本poi對(duì)Excel的行數(shù)列數(shù)有限制short
????????HSSFRow?row?=?sheet.createRow((int)?0);
????????//?第四步,創(chuàng)建單元格,并設(shè)置值表頭?設(shè)置表頭居中
????????HSSFCellstyle?style?=?wb.createCellstyle();
????????style.setAlignment(HSSFCellstyle.ALIGN_CENTER);?//?創(chuàng)建一個(gè)居中格式

????????????HSSFCell?cell?=?row.createCell((short)?0);
????????????cell.setCellValue(“河道ID“);
????????cell.setCellstyle(style);
????????cell?=?row.createCell((short)?1);
????????cell.setCellValue(“河道名稱“);
????????cell.setCellstyle(style);
???????/*?cell?=?row.createCell((short)?2);
????????cell.setEncoding(HSSFCell.ENCODING_UTF_16);
????????cell.setCellValue(“年齡“);
????????cell.setCellstyle(style);
????????cell?=?row.createCell((short)?3);
????????cell.setCellValue(“性別“);
????????cell.setCellstyle(style);
????????cell?=?row.createCell((short)?4);
????????cell.setCellValue(“生日“);
cell.setCellstyle(style);*/

//?第五步,寫入實(shí)體數(shù)據(jù)?實(shí)際應(yīng)用中這些數(shù)據(jù)從數(shù)據(jù)庫(kù)得到,

for?(int?i?=?0;?i? row?=?sheet.createRow((int)?i?+?1);
River?river?=?(River)?info.get(i);
//?第四步,創(chuàng)建單元格,并設(shè)置值
row.createCell((short)?0).setCellValue(river.getId());
row.createCell((short)?1).setCellValue(river.getRiverName());
/*row.createCell((short)?2).setCellValue((double)?stu.getAge());
row.createCell((short)?3).setCellValue(stu.getSex()?==?true???“男“?:?“女“);
cell?=?row.createCell((short)?4);
cell.setCellValue(new?SimpleDateFormat(“yyyy-mm-dd“).format(stu.getBirthday()));*/
}
????????//?第六步,將文件存到指定位置
????????try
????????{
????????????FileOutputStream?fout?=?new?FileOutputStream(“E:/riverResult.xls“);
????????????wb.write(fout);
????????????fout.close();
????????????System.out.println(“文件已導(dǎo)出到:E:/riverResult.xls“);
????????}
????????catch?(Exception?e)
????????{
????????????e.printStackTrace();
????????}



????}

/**
?*?@param?target?需要替換的無(wú)序名稱
?*?@param?base?正確的有序名稱
?*?@return?判斷兩個(gè)名稱的相似度
?*/
public?Boolean?valueCorrect(String?target?String?base)?{
char[]?arr?=?base.toCharArray();
int?length?=?arr.length;
int?count?=?0;
int?i?=?0;
for?(;?i? if?(length?>?1?&&?target.indexOf(String.valueOf(arr[i]))?>?-1)?{
?count++;
}

}
if((count>0&&length-count==0)||(count>3&&length-co

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????1201??2017-11-04?22:56??FXMap\.classpath

?????文件????????569??2017-11-01?16:29??FXMap\.project

?????文件????????598??2017-11-01?16:29??FXMap\.settings\org.eclipse.jdt.core.prefs

?????文件????????101??2017-11-01?16:29??FXMap\bin\application\application.css

?????文件???????3500??2017-11-28?21:49??FXMap\bin\application\ExportToExcel.class

?????文件???????1156??2017-11-28?12:49??FXMap\bin\application\FeatureEditingApp$1$1.class

?????文件???????2503??2017-11-28?12:49??FXMap\bin\application\FeatureEditingApp$1.class

?????文件???????1072??2017-11-28?12:49??FXMap\bin\application\FeatureEditingApp$2.class

?????文件????????915??2017-11-28?12:49??FXMap\bin\application\FeatureEditingApp$3.class

?????文件???????4589??2017-11-28?12:49??FXMap\bin\application\FeatureEditingApp.class

?????文件???????1046??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$1.class

?????文件???????1549??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$10.class

?????文件???????2418??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$11.class

?????文件???????1246??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$2.class

?????文件???????1690??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$3.class

?????文件????????848??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$4.class

?????文件???????1555??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$5.class

?????文件???????1399??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$6.class

?????文件???????1401??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$7.class

?????文件???????1580??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$8.class

?????文件???????1589??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$9.class

?????文件???????1257??2017-11-28?20:54??FXMap\bin\application\LocalIdentify$MouseClickedOverlay.class

?????文件??????14834??2017-11-28?20:54??FXMap\bin\application\LocalIdentify.class

?????文件???????1646??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery$1.class

?????文件???????2280??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery$2.class

?????文件???????1074??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery$3.class

?????文件???????1722??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery$4.class

?????文件????????876??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery$5.class

?????文件???????1420??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery$MouseClickedOverlay.class

?????文件???????8144??2017-11-28?12:49??FXMap\bin\application\LocalSpatialQuery.class

............此處省略27個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源