-
Notifications
You must be signed in to change notification settings - Fork 830
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
Simplify save_graph_xml output #915
Comments
In addition, it seems that the function adds tags even when the values do not exist: <node id="2" timestamp="2017-01-01T00:00:00Z" uid="1" user="osmnx" version="1" changeset="1" lat="nan" lon="nan">
<tag k="highway" v="nan"/>
</node> When the values are null/NaN, they shouldn't be written to the xml file in my opinion. Might be worth fixing this as well. :) |
Do the |
@gboeing Hi, Yeah, it seems like it can.
Since I don't want those it's fine for my use-case, but it could be nice to add a way to set the values. |
@mxndrwgrdnr do you remember the reasoning behind these default values? Are they specified by the API somewhere? |
I don't recall exactly, but I know that at the time I wrote this code I was using a command-line tool (Osmium?) for testing that my outputs were valid .osm files. I'm pretty sure that without these fields present I couldn't get my files to validate, or at least the validator would complain about it. |
Closed by #917 |
See enhancements in #1135 User can now specify custom values for each attribute by simply setting those attribute values on the graph nodes/edges before saving as XML. |
Do not delete the following template. Fill it out completely.
Is your feature proposal related to a problem?
The
save_graph_xml
function adds a lot of (unnecessary?) data to the resulting XML file:osmnx/osmnx/osm_xml.py
Lines 207 to 212 in 586cf26
The resulting XML file has a lot of extra fields compared to regular OSM XML files :
In addition, what's the point of the timestamp if it's always the same date in 2017?
Describe the solution you'd like to propose
Either:
save_graph_xml
to decide whether or not these extra fields should be added to the xml file, or:Thanks!
The text was updated successfully, but these errors were encountered: