gws.gis.extent

gws.gis.extent.from_string(s: str) → Optional[Tuple[float, float, float, float]][source]

Create an extent from a comma-separated string “1000,2000,20000 40000”

gws.gis.extent.from_center(xy: Tuple[float, float], size: Tuple[float, float]) → Tuple[float, float, float, float][source]
gws.gis.extent.from_box(box: str) → Optional[Tuple[float, float, float, float]][source]

Create an extent from a Postgis BOX(1000 2000,20000 40000)

gws.gis.extent.valid(e) → Optional[Tuple[float, float, float, float]][source]
gws.gis.extent.list_valid(exts: List[Tuple[float, float, float, float]]) → List[Tuple[float, float, float, float]][source]
gws.gis.extent.merge(exts: List[Tuple[float, float, float, float]]) → Tuple[float, float, float, float][source]
gws.gis.extent.constrain(a: Tuple[float, float, float, float], b: Tuple[float, float, float, float]) → Tuple[float, float, float, float][source]
gws.gis.extent.center(e: Tuple[float, float, float, float]) → Tuple[float, float][source]
gws.gis.extent.size(e: Tuple[float, float, float, float]) → Tuple[float, float][source]
gws.gis.extent.diagonal(e: Tuple[float, float, float, float]) → float[source]
gws.gis.extent.circumsquare(e: Tuple[float, float, float, float]) → Tuple[float, float, float, float][source]

A circumscribed square of the extent.

gws.gis.extent.buffer(e: Tuple[float, float, float, float], buf: int) → Tuple[float, float, float, float][source]
gws.gis.extent.intersect(a: Tuple[float, float, float, float], b: Tuple[float, float, float, float]) → bool[source]
gws.gis.extent.transform(e: Tuple[float, float, float, float], src: str, dst: str) → Tuple[float, float, float, float][source]
gws.gis.extent.transform_to_4326(e: Tuple[float, float, float, float], crs: str) → Tuple[float, float, float, float][source]
gws.gis.extent.swap_xy(e: Tuple[float, float, float, float]) → Tuple[float, float, float, float][source]