Skip to main content

All Questions

Tagged with
3 votes
0 answers
84 views

Is there a way to approximate a polygon to a polygon in a road network

I'm working with polygons in maps. I have a df, df_polygons, each row in the df refers to a different polygon. And df_polygons['polygon'] retrieves a specific polygon, defined by a set of ordered ...
Beatriz Santos's user avatar
1 vote
1 answer
858 views

How to create NetworkX graph with n nodes (OSMnx compatible) from Shapely object

Let's assume we have the following Shapely object: from shapely import geometry # (lat, long) coordinates p1 = geometry.Point(-96.87,32.88) p2 = geometry.Point(-96.77,33.00) p3 = geometry.Point(-96....
illuminato's user avatar
  • 1,154
0 votes
0 answers
322 views

Find points where a polygon and the road network intersect

I want to find the intersecting points between a polygon and the road network and add them to the network as nodes. import osmnx as ox import folium from shapely.geometry import Polygon G = ox....
hegdep's user avatar
  • 596
0 votes
0 answers
487 views

Is there a way to calculate the area of a building in OSMNX?

Let me start of by stating that I'm new to programming in Python and working with OSMNX. I have the building footprints saved in a Geodataframe as: gdf = ox.geometries_from_polygon(P, tags={'building':...
Shaya Joemmanbaks's user avatar
0 votes
1 answer
1k views

OSMnx: Retrieve building polygon for multiple cities

I am new to osm. Currently I am trying to retrieve multiple cities' building polygon using osmnx package in python. Code: place = "Kuala Lumpur, Malaysia" graph = ox.footprints....
julian's user avatar
  • 3
2 votes
1 answer
4k views

Retrieve data from a Polygon using osmnx

I want to access the data that corresponds to Continental Portugal (the part next to spain, therefore excluding the islands), using osmnx: import geopandas as gpd import pandas as pd from shapely....
DPM's user avatar
  • 905