#coding=utf-8
import arcpy
gdb=r'E:\xxx\Hanxxx84zxxou.gdb'
arcpy.env.workspace=gdb
fc_path=r'REGION\行政区'
out_feature_class2=r'REGION\fishnet'
fc=arcpy.ListFeatureClasses(feature_dataset='REGION', wild_card='行政区')
print(fc, fc[0])
desc = arcpy.Describe("REGION\行政区")
print(desc.featureType, desc.extent)
# ext=desc.extent
# GIS 米与度的转换公式
# double kilometter = 0.0089932202929999989 //1千米转为度
# degree = meter / (2 * Math.PI * 6371004) * 360;
m=0.0000089932202929999989 #1米
fishnet = arcpy.CreateFishnet_management(out_feature_class = out_feature_class2,
origin_coord=str(desc.extent.lowerLeft),
y_axis_coord=str(desc.extent.XMin) + " " + str(desc.extent.YMax),
cell_width = m*100,
cell_height = m*100,
number_rows= None,
number_columns = None,
labels = "LABELS",
corner_coord=str(desc.extent.upperRight),
template = '#',
geometry_type = "POLYGON")
print('over')