zoukankan      html  css  js  c++  java
  • arcpy 创建渔网fishnet

    #coding=utf-8
    import arcpy
    
    
    gdb=r'E:xxxHanxxx84zxxou.gdb'
    arcpy.env.workspace=gdb
    
    fc_path=r'REGION行政区'
    out_feature_class2=r'REGIONfishnet'
    
    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')
  • 相关阅读:
    【[CQOI2015]选数】
    杜教筛
    【[CQOI2009]跳舞】
    【简单的数学题】
    【[SDOI2013]泉】
    【[AHOI2013]差异】
    【[HEOI2016/TJOI2016]序列】
    【[SDOI2008]Sandy的卡片】
    linux系统编程之信号(一)
    linux系统编程之进程(五)
  • 原文地址:https://www.cnblogs.com/yansc/p/15216739.html
Copyright © 2011-2022 走看看