Skip to main content
edited body
Source Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

youYou can easily get bounding box using fiona,.

The minimum bounding rectangle (MBR) or bounds of the collection’s records is obtained via a read-only bounds attribute. https://fiona.readthedocs.io/en/latest/manual.html#format-drivers-crs-bounds-and-schema

import fiona

shp_file = 'a_polygon_shapefile.shp'
c = fiona.open(shp_file)
c.bounds # Returns (minx, miny, maxx, maxy)
(-8.621389, 49.911659, 1.749444, 60.844444)

you can easily get bounding box using fiona,

The minimum bounding rectangle (MBR) or bounds of the collection’s records is obtained via a read-only bounds attribute. https://fiona.readthedocs.io/en/latest/manual.html#format-drivers-crs-bounds-and-schema

import fiona

shp_file = 'a_polygon_shapefile.shp'
c = fiona.open(shp_file)
c.bounds # Returns (minx, miny, maxx, maxy)
(-8.621389, 49.911659, 1.749444, 60.844444)

You can easily get bounding box using fiona.

The minimum bounding rectangle (MBR) or bounds of the collection’s records is obtained via a read-only bounds attribute. https://fiona.readthedocs.io/en/latest/manual.html#format-drivers-crs-bounds-and-schema

import fiona

shp_file = 'a_polygon_shapefile.shp'
c = fiona.open(shp_file)
c.bounds # Returns (minx, miny, maxx, maxy)
(-8.621389, 49.911659, 1.749444, 60.844444)
Source Link

you can easily get bounding box using fiona,

The minimum bounding rectangle (MBR) or bounds of the collection’s records is obtained via a read-only bounds attribute. https://fiona.readthedocs.io/en/latest/manual.html#format-drivers-crs-bounds-and-schema

import fiona

shp_file = 'a_polygon_shapefile.shp'
c = fiona.open(shp_file)
c.bounds # Returns (minx, miny, maxx, maxy)
(-8.621389, 49.911659, 1.749444, 60.844444)