4
用Python创建方格多边形shapefile?
我有以下坐标 minx, maxx, miny ,maxy = 448262.080078, 450360.750122, 6262492.020081, 6262938.950073 我希望使用python创建一个大小为1 m的正方形网格。 import math minx,maxx,miny,maxy = 448262.080078, 450360.750122, 6262492.020081, 6262938.950073 size = 1 def set_bbox(minx, maxx, miny, maxy, distx, disty): nx = int(math.ceil(abs(maxx - minx)/distx)) ny = int(math.ceil(abs(maxy - miny)/disty)) new_maxx = minx + (nx*distx) new_miny = maxy - (ny*disty) …