Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save_graph_shapefile no encoding option #20

Closed
raphadasilva opened this issue Dec 24, 2016 · 2 comments
Closed

save_graph_shapefile no encoding option #20

raphadasilva opened this issue Dec 24, 2016 · 2 comments

Comments

@raphadasilva
Copy link

Good morning !

I don't know if it's the right place to make this observation, I apologize by advance if it's not. Here's my point : I used OSMnx to display the street network of Liège (Belgium).

import osmnx as ox, matplotlib.pyplot as plt

liege_streets = ox.graph_from_place('Liège, Belgique', network_type='walk', retain_all=True)
liege_streets = ox.project_graph(liege_streets)

fig, ax = ox.plot_graph(liege_streets, fig_height=10, show=False, node_size=0, close=False, edge_color='#777777')

plt.show

This works perfectly fine, with this nice view of Liège :
liege

Then, I wanted to save this network in shapefile format. My goal was to achieve a merge with another lib', so I used the command :
ox.save_graph_shapefile(liege_streets, filename='liege_streets')

But there was this message :
WARNING:Fiona:CPLE_AppDefined in b"One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1.\nThis warning will not be emitted anymore."

I'm stuck because I would keep the UTF-8 encoding (because my other database is encoded with UTF-8). I read the code of save_graph_shapefile function and found no argument refering to the file's encoding. Do you think I must use Fiona library to do that ?

Thanks in advance and have a nice day !

@gboeing
Copy link
Owner

gboeing commented Dec 28, 2016

Good point. I think geopandas has an encoding argument that I can propagate to the save_graph_shapefile() function. I'll add this to the next release.

@gboeing
Copy link
Owner

gboeing commented Dec 28, 2016

Resolved by d07ab54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants