Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- import xlrd
- import os
- workspace = r"\coacd.orgdfsSWSCode EnforcementACD Admin OperationsGISOperationsCouncil District Analysis ReportingAuto_HeatMap_WIPshpsworking_environment.mxd"
- arcpy.env.workspace = workspace
- arcpy.env.overwriteOutput = True
- autoLayer = "shps\autoLayers.gdb"
- mxd_path = os.path.join(autoLayer, workspace)
- SOURCE_DATA = r"\coacd.orgdfsSWSCode EnforcementACD Admin OperationsGISOperationsCouncil District Analysis ReportingAuto_HeatMap_WIPSource_DataSOURCE_DATA.xlsx"
- #convert the workbook called XY doc to a table called XYtable
- xyPointsPlotted = arcpy.ExcelToTable_conversion(SOURCE_DATA, autoLayer,"")
- spatial_ref = arcpy.SpatialReference("WGS 1984")
- output_layer = "sample_xy_points"
- saved_Layer = "shps\sample_xy_points.lyr"
- arcpy.MakeXYEventLayer_management(xyPointsPlotted, "Longitude", "Latitude", output_layer,"WSG 1984","" )
- arcpy.SaveToLayerFile_management(output_layer, saved_Layer)
- #project layer into Texas FIPS
- arcpy.CopyFeatures_management(saved_Layer, "coded_xy_points")
- repr_spatial_ref = arcpy.SpatialReference("NAD 1983 StatePlane Texas Central FIPS 4203 (US Feet)")
- arcpy.Project_management("\coded_xy_points", "\coded_xy_points_FIPS4203", repr_spatial_ref)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement