Questions tagged [shapely]

PostGIS-ish operations outside a database context for Pythoneers and Pythonistas.

Shapely is a BSD-licensed Python package for manipulation and analysis of planar geometric objects. It is based on the widely deployed GEOS (the engine of PostGIS) and JTS (from which GEOS is ported) libraries. This C dependency is traded for the ability to execute with blazing speed. Shapely is not concerned with data formats or coordinate systems, but can be readily integrated with packages that are. For more details, see:

740 questions
-2
votes
1 answer

Definite points in zones and got an error ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()

I have a list of customers lat and long and I want to define which ones are within given a list of zones or polygons. from shapely.geometry import Polygon from shapely.geometry import Point import pandas as pd from shapely.wkt import loads import…
-2
votes
1 answer

Shapely Polygon intersect in order Python

I have 2 list of Polygon as below: list1 = [p1, p2, p3] list2 = [pa, pb, pc] I want to check if p1 overlaps pa, p2 overlaps pb, and p3 overlaps pc. I used shapely.intersects to check whether they overlap with each other. But I don't know how to…
Windy764
  • 67
  • 6
-2
votes
1 answer

Get the neighbours of a point in polygon using Shapely

Say I have a polygon with points a, b, c, d sample = Polygon(((10, 10), (10, 20), (20, 10), (20, 20))) Can someone tell me how to find only its neighbours and not the point diagonally opposite. In the example say if I'm in (10,10), I need to get…
Nitish
  • 11
  • 2
-2
votes
2 answers

TypeError: __init__() takes exactly 4 arguments (3 given) Point Shapely

I am trying to write a program to create lines and points using shapely, somehow when I try to create a point from a Linestring I get the following error, and this persists even if I put in integer numbers: I get the following error for my…
LoveMeow
  • 3,136
  • 7
  • 37
  • 60
-4
votes
1 answer

How to display Polygon List into one Graph with For Loops

so I'm working on a Line of Sight script where the Polygons act as buildings and return a boolean value based on whether a line intersects with a Polygon. The logic behind it works, but when I try to integrate more Polygons from a list called…
1 2 3
49
50