Closed Senousi closed 5 years ago
Do not simplify your graph when you first create it if you want to manually simplify it later:
import osmnx as ox
ox.config(use_cache=True, log_console=True)
G = ox.graph_from_place('Beijing, China', network_type='walk', which_result=2, simplify=False)
G_simpl = ox.simplify_graph(G, strict=False)
G_proj = ox.project_graph(G_simpl,to_crs={'proj':'longlat','epsg':'32750' ,'ellps':'WGS84', 'datum':'WGS84'})
Firstly thank you very much.
I need an illustration of concerning the number of edges. where the number of edge for the original network graph in my code without using the simplfy_graph
method is smaller than the simplified network graph for the same region
import geopandas as gpd
Bj_edges_walk_gpd = gpd.read_file(r'****\data\network_walk_projected\edges\edges.shp')
print(Bj_edges_walk_gpd.shape)
Bj_edges_walk_simpl_gpd = gpd.read_file(r'****\data\network_walk_projected_simple\edges\edges.shp')
print(Bj_edges_walk_simpl_gpd.shape)
(125305, 18) #not simplified
(136935, 18) # simplified
Can you help me to understand that?
Without a standalone complete MWE it's impossible to guess the content of those files or what's going on there. The issue tracker is for reporting bugs in OSMnx or proposing new features. For how-to questions, please ask on StackOverflow.
This issue tracker is for reporting bugs or proposing new features. Please ask "how-to" questions on https://stackoverflow.com/ instead. Before you proceed, please read the contributing guidelines in this repo's CONTRIBUTING.md.
If you installed OSMnx via conda and are experiencing installation problems, please open an issue at https://github.com/conda-forge/osmnx-feedstock/issues
If you're having trouble with OSMnx, first search the previously opened issues (and Stack Overflow) to see if the problem has already been noted. If not, fill in the template below:
Problem description (what did you do, what did you expect to happen, and what actually happened)
I obtained this error
TypeError: unhashable type: 'list'
when trying to simplify the network of Beijing city.The error as follows:
What operating system, architecture, Python version, and OSMnx version are you using?
windows 10 ram 48 python 3.6 OSMnx last version (0.9)
Complete list of your environment's packages and their versions (for example, run
conda list
orpip list
then paste the output below, between the two "details" tags)Code snippet that independently and completely reproduces the issue