1

Geopandas read has as options bbox and mask.

https://geopandas.org/reference/geopandas.read_file.html

What is the difference between those two options?

2

Geopandas read_file() allows you to subset vector data by either a rectangular area made up of 4 coordinates (a bounding box) or an irregular shaped polygon (mask). The subset will include all of the features that intersect the bounding box or mask. It is important to note that read_file() will not clip your input features to the bounding box or mask boundaries.

3
  • 2
    ah i see, box of course consists only of four coordinates, while a mask can be an irregular shape. but are you sure about the clipping that is done by the mask? because in the documentation (geopandas.org/reference/geopandas.read_file.html) it states that it takes all geometries that "intersect".
    – Leo
    Jul 13 '20 at 12:30
  • read_file does not clip geometries by mask, it just reads only those which intersect mask. Jul 14 '20 at 9:10
  • Thank you @martinfleis, I have edited the post to clarify how features are handled with the bbox and mask options.
    – Aaron
    Jul 14 '20 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.