34420118GEOMATICS&SPATIALINFORMATIONTECHNOLOGYVol.34No.4Aug.20112011-04-201979-2004。Python410004Python。。PythonArcGISP208B1672-5867201104-0081-02SpatialDataBatchProcessingusingPythonPENGHai-boXIANGHong-puHunanLandResourcesInformationCenterChangsha410004ChinaAbstractCombiningwithworkingpracticethepaperintroducesapplicationofpythoninspatialdatabatchprocessingbasedonanaly-zingthecharacteristicsofPython.Theprogrammingexamplescanbereferredbyrelatedprofessionals.KeywordsPythonArcGISspatialdatabatchprocessing0ArcGIS。、。。ArcGISARCTOOLBOX。ARCTOOLBOX“BATCH”。ArcGIS。VBVCArcGIS。。PythonArcGIS。1Python1Python、。PythonMac。2Python。。Python。3ArcGISArcGISPythonPerlVB-ScriptJScriptCOM。ESRIArcGIS9.0PythonArcGIS。ARCTOOLBOXPython“EDIT”。Python、。2PythonVBVCPython、Geoprocessor、。GeoprocessorCOMWINDOWSimportwin32com.client#win32com.clientgp=win32com.client.Dispatch“esriGeoprocessing.GpDis-patch.1”#GeoprocessorArcGISscripting9.2。importArcGISscriptinggp=ArcGISscripting.creategpgp.workspace=”c\\workspace”#gp.clip12…#gp.Buffer12…#…3Python、Python。3.13.1.1os.walkVBVCPythonoswalk。、、forpathrootdirnamesfilenamesinos.walk“C\\work-space”pathrootdirnamesfilenames。3.1.2glob.globD\SHP\G49G001001\G49G001001.shpD\SHP\G49G001002\G49G001002.shp。glob.glob“*”shpList=glob.glob“D\\SHP\\*\\*.shp”shp。3.2PythonLIST*&。fileList=os.listdir“C\\workspace”#C\work-spacei=lenfileList#fileList0#44.1CoveragePersonalGeoData-baseArcGISCoverageSHPGeoDatabase。CoveragePersonalGeoDatabase。ARCCatalogimport。Python。importosArcGISscripting#gp=ArcGISscripting.create#GeoprocessorcovType=“polygon”#Coverage“”pathCov=raw_input'CoverageD\\test\\aaa'#pathMDB=raw_input'MDBD\\test\\aaa.mdb\\aaa'forpathrootdirnamesfilenamesinos.walkpathCov#pathCovCoverage、fordirnameindirnames#Cover-ageifdirname=infoanddirname=#Coverage”““info”pathC=pathCov+\\+dirname#Coveragegp.featureclasstofeatureclass_conversionpathC+\\+covTypepathMDBdirname#4.2SHP“D\SHP\\”。coordsys=C\\Xian1980GKZone19.prj#filepath=raw_input''#D\\SHPli=glob.globfilepath+\\*\\*.shp#shpi=085282011ArcGISTokenService。。2.4ArcGISServerNetworkArcGISServerArcGISNetwork。、。、。。VBScript。NAServer。http//localhost/arcgis/services/aervices/MyDrive/MapServer/NAServer/RouteFlexNAServer<esriRouteTaskid=routeTaskconcurrency=lastfault=faultHandlereventrequestTimeout=60showBusyCursor=truesolveComplete=solveCompleteHandlereventurl=http//192.168.104.68/ArcGIS/rest/serv-ices/SHMAP_Drive/NAServer/Route/><esriRouteParametersid=routeParamsstops=stopsreturnRoutes=truereturnDirections=truedirectionsLengthUnits=esriMeters/>stops、。solve-CompleteHandlerRouteTask。3ESRIArcGIS、ArcGIS、。1ESRI.2009ESRIC.2009.2.———、M.2001.3JeffTapperMichaelLabriolamatthewBoles.Flex3M.2009.82whilei<lenli#gp.defineprojectionliicoordsys#i=i+1Python。4.3ARCToolboxPythonARCTOOLBOXARC-TOOLBOX。“pathCov=raw_input'CoverageD\\test\\aaa'”pathCov=sys.argv1“pathMDB=raw_input'MDBD\\test\\aaa.mdb\\aaa'”pathMDB=sys.argv2。ARCTOOLBOXToolboxscript。1。1ARCTOOLBOXFig.1ThecustomizedtoolofARCTOOLBOX587584ArcGIS1∶50000。RTKGPS。、、、、、、。GPS。4Leica1230GPS。Leica1230GPSGPS3mm+0.5ppm。30min515°。GPS45min。18、8、12。。2.2GPSGPSTrimbleGeomat-icsOfficeTGO。GPS、WGS-84。CEB。1∶50000TGOSriLanka。SriLanka。。。0.057m0.078m0.393m。、。2.38WGS-84。RTK560.5m。。CEB。3、。GPS1。2GPS。GPS。3TGO。Puttalam。GPS。1.GPSM.2004.2.GPSJ.2005366-8.3.GPSJ.200629425-27.4.GPSJ.20013414-16.5.WGS-84J.2008318-21.85ArcGIS9.2Python2.4。0.5~1.0h。、。Python、、。Python。1.Python———M.2007.2.ArcObjectsVBM.20073.pythonJ.2008183-84.784Puttalam