Category : geopandas

I am used to R, and am switching to python for some geo transformations. For one task, I need to group polygons in a geopandas dataframe by intersection. However, I can only find geopandas arguments that can do this between two dataframes. For example, these two polygons in the dataframe: should get the same group ..

Read more

I am using this shapefile with polygons containing a variable z. According to the sf package in R, the maximum value of the z-column is 43, according to geopandas in Python the maximum value of the z-column is 7. How on earth is this possible? in R: library(sf) theshapefile <- read_sf("z_mystery.shp") summary(theshapefile$z) Min. 1st Qu. ..

Read more

I have a long list of multi polygons in GeoPandas dataframe (Sample below) covering a large area As you can see each Polygon has a value assigned to it Name value geometry A 12 POLYGON ((77.68348564872542 12.99627120468158, 77.68342242070528 12.99622571412862, 77.68330368855688 12.99612312693776, 77.68318850133652 12.99598589207154, 77.68314046359954 12.99589410727104, 77.6831038964277 12.9957752894096, 77.68308734514889 12.99569471232377, 77.68308259730425 12.99561785917489, 77.68307797577933 12.99555254016757, 77.68307739733692 12.9954987148256, ..

Read more

I have a GeoDataFrame in which the geometry column consists of polygons. Zones = id geometry 0 A1 POLYGON ((119.82334 28.35047, 119.79008 28.350… 1 A2 POLYGON ((138.79141 26.48802, 141.92247 26.261… 2 A3 POLYGON ((65.42208 48.14785, 65.42208 48.14785… 3 A4 POLYGON ((152.14557 25.88444, 155.50298 26.186… and the geometry column is actually a geometry-type obejct: <class ‘geopandas.geodataframe.GeoDataFrame’> ..

Read more

I have two geo-coordinates points and would like to draw a line between them. from shapely.geometry import LineString line = LineString([ (25.187500,56.579722), (24.400000,61.333333)] ) I also have another shapeFile Polygon, which I read through shp = gpd.read_file(shapeFolder+’Alpha.shp’) I need to find the first intersection point between shp and the line but I’m not sure how ..

Read more