I have a huge shapefile (over 400MB) of an entire city that contains many polygons of the residential area of this city. I can check it on QGIS as the following:
This shapefile contains a huge number of polygons, and I'd like cut a small shapefile from it in a circular or squared area around a point. So, let's say I give a point to a system, I want to return all the polygons around this area inside an offset (just so I can send only this segmentation of the data to the frontend of my application).
I know I could convert this shapefile to GeoJSON and find what are the polygons that exist inside the area that I have created (using turf.js for example), but that would be a brute force solution and it wouldn't be efficient.
On the other hand, I know I could install PostgreSQL and PostGIS and implement solutions like this one.
My doubt is that if I can achieve the goal of finding all polygons inside a polygon efficiently using only the command line, Python or JavaScript without implementing a spatial index for that, working directly with the shapefile. Is it possible?