Skip to content

saleemshenlin/xml2shp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xml2shp

使用arcpy,将xml文件转换为shapefile文件

  1. arcpy.CreateFeatureclass_management()创建要素集

  2. arcpy.AddField_management()加入字段

  3. xml.dom.minidom.parse() 逐行读取xml

  4. arcpy.da.InsertCursor(shpfilename,("NAME","LNG","LAT","FROM_","SHAPE@XY"))建立Cursor

  5. cursor.insertRow(scenicName,float(scenicLng),float(scenicLat),scenicFrom,(float(scenicLng),float(scenicLat)))) 逐行导入数据

About

使用arcpy,将xml文件转换为shapefile文件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages