Dear all,
I have uploaded the beta version of the "clipgeo" package on GitHub for testing: https://github.com/asjadnaqvi/stata-clipgeo
Examples are also there. I presented this at the Stata Oceania 2022 keynote and finally ended up coding it into an ado. It allows us to clip Stata _shp.dta file on a custom bounding box.
The command is fairly straightforward:
It generates a _shp_clipped.dta file that can be used with spmap. This allows us to easily zoom into regions. clippolygeo also gives errors for some polygon types and I am looking into it.
But please suggest command enhancements etc. I will submit it to SSC in some weeks.
Best,
Asjad
I have uploaded the beta version of the "clipgeo" package on GitHub for testing: https://github.com/asjadnaqvi/stata-clipgeo
Examples are also there. I presented this at the Stata Oceania 2022 keynote and finally ended up coding it into an ado. It allows us to clip Stata _shp.dta file on a custom bounding box.
The command is fairly straightforward:
Code:
clippolyline road_shp, box(-5000,10000,335000,345000) clippolygon nuts0_shp, box(128, 146, -94, -80)
It generates a _shp_clipped.dta file that can be used with spmap. This allows us to easily zoom into regions. clippolygeo also gives errors for some polygon types and I am looking into it.
But please suggest command enhancements etc. I will submit it to SSC in some weeks.
Best,
Asjad