Skip to main content

When splitting the area of interest into boxes, what does idxs_x and idxs_y stand for? I tried to visualize the data frame but I couldn’t make sense of it. And what kind of information does info_list encompass?

I tried to look it up in the documentation but I didn’t find anything that could help (or maybe I haven’t looked enough).


# Create the splitter to obtain a list of bboxes (large splitter boxes)
bbox_splitter = BBoxSplitter(icountry_shape], country_crs, (38, 81))

bbox_list = np.array(bbox_splitter.get_bbox_list())
info_list = np.array(bbox_splitter.get_info_list())

# Prepare info of selected EOPatches
geometry = tPolygon(bbox.get_polygon()) for bbox in bbox_list]
idxs_x = sinfo 'index_x'] for info in info_list]
idxs_y = sinfo 'index_y'] for info in info_list]

df = pd.DataFrame({'index_x':idxs_x, 'index_y':idxs_y})
gdf = gpd.GeoDataFrame(df,crs=country.crs, geometry=geometry)
gdf.head()

here is the resultant data frame:

It’s a GeoDataFrame. Try gdf.plot(), or export it to geojson/shapefile/… and plot it in QGIS or similar.


This is what I got when I plotted it, not sure though what it supposed to mean.

Batic is right. I have had the same issue. It’s a Geo DataFrame. You should try gdf.plot() and plot it in QGIS or similar. It will solve the issue.


Regards,


Reply