Category "shapely"

Flipping longitude and latitude coordinates in GeoPandas

I'm working with datasets where latitudes and longitudes are sometimes mislabeled and I need to flip the longitudes and the latitudes. The best solution I could

Why is Shapely plotting two lines when I change a coordinate?

I'm trying to understand how Shapely works. I can draw a simple line with the following code: import matplotlib.pyplot as plt A = Point(0,0) B = Point(1,1)

GeoDataFrame is Inverted when I converted from Raster to Vector using RasterIO

I'm currently using this code to convert a raster file to a geodataframe: import rasterio from rasterio.features import shapes mask = None with rasterio.open

Projection of a point to a line segment Python Shapely

I have a LineString defined by two points, so essentially a straight line segment, and I wanted to project a point on to it. I am aware of .project and .interpo

Is there an envelope class in shapely?

I found the envelope class in Java's JTS library very handy. An envelope holds the minimal and maximal coordinates of a geometry and is also called bounding box