vectors

Vectors tools

You can use this only if you have installed sertit[full] or sertit[vectors]

Functions

corresponding_utm_projection(lon, lat)

Find the EPSG code of the UTM projection from a lon/lat in WGS84.

from_bounds_to_polygon(left, bottom, right, top)

Convert the bounds to a shapely.polygon.

from_polygon_to_bounds(polygon)

Convert a shapely.polygon to its bounds, sorted as left, bottom, right, top.

get_aoi_wkt(aoi_path[, as_str])

Get AOI formatted as a WKT from files that can be read by Fiona (like shapefiles, ...) or directly from a WKT file.

get_geodf(geometry, crs)

Get a GeoDataFrame from a geometry and a crs

get_wider_exterior(vector)

Get the wider exterior of a MultiPolygon as a Polygon :param vector (vector: gpd.GeoDataFrame): Polygon to simplify

read(path[, crs, archive_regex])

Read any vector: - if KML: sets correctly the drivers and open layered KML (you may need ogr2ogr to make it work !) - if archive (only zip or tar), use a regex to look for the vector inside the archive. You can use this [site](https://regexr.com/) to build your regex. - if GML: manages the empty errors.

set_kml_driver()

Set KML driver for Fiona data (use it at your own risks !)

shapes_to_gdf(shapes, crs)

Convert rasterio shapes to geodataframe