Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. import arcpy
  2. import xlrd
  3. import os
  4.  
  5.  
  6. workspace = r"\coacd.orgdfsSWSCode EnforcementACD Admin OperationsGISOperationsCouncil District Analysis ReportingAuto_HeatMap_WIPshpsworking_environment.mxd"
  7. arcpy.env.workspace = workspace
  8. arcpy.env.overwriteOutput = True
  9. autoLayer = "shps\autoLayers.gdb"
  10.  
  11. mxd_path = os.path.join(autoLayer, workspace)
  12.  
  13. SOURCE_DATA = r"\coacd.orgdfsSWSCode EnforcementACD Admin OperationsGISOperationsCouncil District Analysis ReportingAuto_HeatMap_WIPSource_DataSOURCE_DATA.xlsx"
  14.  
  15. #convert the workbook called XY doc to a table called XYtable
  16. xyPointsPlotted = arcpy.ExcelToTable_conversion(SOURCE_DATA, autoLayer,"")
  17. spatial_ref = arcpy.SpatialReference("WGS 1984")
  18. output_layer = "sample_xy_points"
  19. saved_Layer = "shps\sample_xy_points.lyr"
  20.  
  21.  
  22. arcpy.MakeXYEventLayer_management(xyPointsPlotted, "Longitude", "Latitude", output_layer,"WSG 1984","" )
  23.  
  24. arcpy.SaveToLayerFile_management(output_layer, saved_Layer)
  25.  
  26. #project layer into Texas FIPS
  27. arcpy.CopyFeatures_management(saved_Layer, "coded_xy_points")
  28.  
  29. repr_spatial_ref = arcpy.SpatialReference("NAD 1983 StatePlane Texas Central FIPS 4203 (US Feet)")
  30. arcpy.Project_management("\coded_xy_points", "\coded_xy_points_FIPS4203", repr_spatial_ref)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement