dsc = gp.describe(dnrMgmtAllFC) #this is a polygon FC that the fishnet must cover xMin = dsc.extent.xmin #THIS WOULD BE THE X COORDINATE OF YOUR POINT yMin = dsc.extent.ymin #THIS WOULD BE THE Y COORDINATE OF YOUR POINT xMax = dsc.extent.xmax yMax = dsc.extent.ymax bufferWidth = 1 #Buffer width expands the the extent of the fishnet by that many map units (to make sure it extends past DNR lands a bit) numberOfRows = 6 numberOfColumns = 6 fishnetLine1FC = fgdbPath + "\\fishnet_line1" gp.CreateFishnet_management(fishnetLine1FC, str(xMin - bufferWidth) + " " + str(yMin - bufferWidth), str(xMin - bufferWidth) + " " + str(yMin), "0", "0", numberOfRows, numberOfColumns, str(xMax + bufferWidth) + " " + str(yMax + bufferWidth), "NO_LABELS", ""); showGpMessage() fishnet1FC = fgdbPath + "\\fishnet_poly1" gp.FeatureToPolygon_management(fishnetLine1FC, fishnet1FC, "", "", ""); showGpMessage() gp.Delete_management(fishnetLine1FC, ""); showGpMessage()
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.