x0 = np.array([i[0] for i in a]) y0 = np.array([i[1] for i in a]) return [x0 + xul + well3x, y0 + yll + well3y] test = PointsInCircum(xul, yll, 50, 100) xcirc = test[0].tolist() ycirc = test[1].tolist() # make a shapefile! circle = pd.DataFrame({'x': xcirc, 'y': ycirc}) # get model coordinates circle['ModelX'] = circle['x'] - xul circle['ModelY'] = yul - circle['y'] rows, cols = sr.get_rc(circle['x'].tolist(), circle['y'].tolist()) circle['Row'], circle['Column'] = rows, cols # get the local coordinates for input to modpath6 def calc_local_x(delr, col, x): temp_x = delr * (col) val = x - temp_x localX = val / delr return localX def calc_local_y(delc, row, y, nrow): temp_y = delc * (row) val = temp_y - y localY = 1 + (val / delc)
circle = pd.DataFrame({'x':xcirc, 'y':ycirc}) # print(circle) circle['cirque'] = circle.apply(lambda x: Point((float(x.x), float(x.y))), axis=1) circle = geopandas.GeoDataFrame(circle, geometry = 'cirque') circle.to_file('starting_circle.shp', driver='ESRI Shapefile') # get the row/column! delcl = np.ones(nrow)*(int(Lx/ncol)) delrl = delcl sr = SpatialReference(delr=delrl, delc=delcl, xul=xul, yul=yul) # the shapefile grid is wrong i think, because it's -1 on both sides row_column=sr.get_rc(xcirc, ycirc) row=row_column[0].tolist() column=row_column[1].tolist() # get the local x! for i in column: for j in xcirc: print(j) # s1 = column[i]*delc # s2 = xul + s1 # s3 = xcirc[i] - s2 # s4 = delc - s3 # s5 = 1 - (s4/delc) # print(s5)