New answers tagged

0

Apparently the error occurred because two or more sheets with rank in the code were activated, I solved it by adding the code in each # ... sht = wb.sheets ['name_of_the_sheet_to_process']. activate () I share the resulting and functional code, I hope someone will find this post useful import geopandas as gpd import pandas as pd import xlwings as xw from ...


3

I would use spatial join: import geopandas as gpd import pandas as pd import matplotlib.pyplot as plt polygons = gpd.read_file(r"/home/bera/Desktop/tempgis/sweden_hexgrid.shp") polygon_id_field = 'id' points = gpd.read_file(r"/home/bera/Desktop/tempgis/ancient_remains.shp") sjoin = gpd.sjoin(polygons, points, how='left', op='intersects')...


Top 50 recent answers are included