polygon

creating a polygon that covers other polygons layer using python

creating a polygon that covers other polygons layer using python Question: I have a layer with polygons (buildings) and I would like create a polygon that limits the area where the polygons are using geopandas or other python module SO I have these buildings: and I would like to have a new layer with a …

Total answers: 1

Unable to call script into python

Unable to call script into python Question: Below is the code that i am trying to run. I have a few polygon data to convert into longitude and latitude. ‘SVY21()’ is the script i imported to convert my polygon data # Initialization >>> import SVY21() >>> cv = SVY21() # Computing SVY21 from Lat/Lon >>> …

Total answers: 1

determine if a line segment is within a polygon

determine if a line segment is within a polygon Question: I am trying to find out if a given line segment consisting of two or more points is inside a polygon here is a drawing to help capture the idea: picture to help visualize the problem All I found on the internet was a code …

Total answers: 1

Matplotlib patchcollection polygons do not touch

Matplotlib patchcollection polygons do not touch Question: I have two polygons which are supposed to touch each other horizontally (no gap). However, when trying to plot them with PatchCollection, there seem to be a gap between the two, they are not touching: import matplotlib.pyplot as plt import numpy as np from matplotlib.collections import PatchCollection from …

Total answers: 1

remove polygons with an intersection higher than a threshold

remove polygons with an intersection higher than a threshold Question: The goal is to remove polygons with an intersection higher than a threshold, let’s say 80% of the area from the smaller intersected polygon. In the following picture we see in first image how the small red circle in coordinate (2.06, 41.41) is overlapping with …

Total answers: 1

Get the contour (outline) from a png image with the correct edges

Get the contour (outline) from a png image with the correct edges Question: I have multiple png files and I’m trying to get the polygon contour coordinates. That is the simplified coordinates, only each outer corner (not a convex hull polygon). The program that will do this at the moment is python and opencv. But …

Total answers: 1

How do I test if Point is in Polygon/Multipolygon with geopandas in Python?

How do I test if Point is in Polygon/Multipolygon with geopandas in Python? Question: I have the Polygon data from the States from the USA from the website arcgis and I also have an excel file with coordinates of citys. I have converted the coordinates to geometry data (Points). Now I want to test if …

Total answers: 1

Remove a Polygon from a MultiPolygon with shapely in Python

Remove a Polygon from a MultiPolygon with shapely in Python Question: I am working with spatial objects in Python using the shapely library. Given a MultiPolygon, I want to remove from it the Polygons which don’t contain an obstacle. However, I haven’t found a way to do this, even though I can get the coordinates …

Total answers: 1

Check if geo-point is inside or outside of polygon

Check if geo-point is inside or outside of polygon Question: I am using python and I have defined the latitudes and longitudes (in degrees) of a polygon on the map. My goal is to check if a generic point P of coordinates x,y falls within such polygon. I would like therefore to have a function …

Total answers: 4

Extracting polygon given coordinates from an image using OpenCV

Extracting polygon given coordinates from an image using OpenCV Question: I’ve a set of points like the following: <data:polygon> <data:point x=”542″ y=”107″/> <data:point x=”562″ y=”102″/> <data:point x=”582″ y=”110″/> <data:point x=”598″ y=”142″/> <data:point x=”600″ y=”192″/> <data:point x=”601″ y=”225″/> <data:point x=”592″ y=”261″/> <data:point x=”572″ y=”263″/> <data:point x=”551″ y=”245″/> <data:point x=”526″ y=”220″/> <data:point x=”520″ y=”188″/> <data:point x=”518″ y=”152″/> …

Total answers: 1