jiawlu / osm2gmns Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
curl http://download.geofabrik.de/europe/germany/bayern/oberbayern-latest.osm.pbf -o barefoot/map/osm/oberbayern.osm.pbf
net = og.getNetFromFile('oberbayern.osm.pbf')
AttributeError: 'tuple' object has no attribute 'tb_frame'
我查看了源代码,发现几乎没有注解用来描述类和方法的功能,作为一个开源项目,这应该被完善。
I checked the source code and found that there were few comments to describe the functions of classes and methods, which should be supplied as an open source project.
The current zone_id field in node.csv is generated based on activity types and boundary statistics from osm2gmns, and the zone IDs are assigned sequentially. For MPO planning users, they have their own TAZ files or zone centroids. I suggest integrating the taz2zone() from grid2demand function directly into osm2gmns og.generateNodeActivityInfo(net). We can add an additional parameter for zone.csv so that the zone_id in node.csv can be rewritten based on the nearest zone_id, determined by the geometry or point coordinates of each zone. This approach seems the most natural way to complete the function. One can test this feature using the standard Chicago sketch network or the Sioux Falls 24-node network. that is, the Chicago sketch network's zone_id system will be used in the osm2gmns generated node.csv and the readily available demand.csv file from Chicago sketch can be used further traffic assignment.
the current function: net = og.getNetFromFile('asu.osm', POI=True)
might lead to many records.
We hope to have net = og.getNetFromFile('asu.osm', POI=True, amenity_type=("parking", "parking_space") to only extract specified type of amenity. similar to network_types=('auto', "bike", "walk")
In addition, if the users manually filter out the data the in poi.csv, then og.connectPOIWithNet(net) should be enhanced to read the externally given poi csv file, similar to node_file='node.csv',
i.e. og.connectPOIWithNet(net, poi_file = "poi.csv")
those functions are important to ev charging space planning and multimodal city planning.
Since there are many use of POIs, i do recommend to set default POIs = True in the next update
the document is out of date, do you have a plan to renew the document?
Hi~, I am so interested in this package and i want to know could it obtain the data of the poi by census tract?
the issue occurred in ASU POI data set.
Hi, everyone.
The latest version of osm2gmns that I've got (by 'pip install osm2gmns') was 0.6.3, this error appear:
AttributeError: module 'osm2gmns' has no attribute 'connectPOIWithNet'
I did the downgrade to 0.6.2 and I got the same error. My code was:
import osm2gmns as og
net = og.getNetFromOSMFile('cefet_ns.osm', default_lanes=True, POI=True)
og.connectPOIWithNet(net)
og.generateNodeActivityInfo(net)
og.consolidateComplexIntersections(net)
og.generateMovements(net)
og.outputNetToCSV(net)
og.show(net)
PS.: I'm using PyCharm to process. The argument 'POIs' (in the second line of the code), as it is in the documentation bring another error:
net = og.getNetFromOSMFile('cefet_ns.osm', default_lanes=True, POIs=True)
TypeError: getNetFromOSMFile() got an unexpected keyword argument 'POIs'
After use 'POI' the argument error disappear.
Something has changed on the use of connectPOIWithNet?
What does "Configuration information and use definitions" mean for GMNS static models?
What is a "connector link" - mesoscopic modeling?
In table for microscopic modeling, the id of its parent macroscopic link is included; can there be multiple parent links? How will this information be used?
Dear author,
I recently needed to label bridge and tunnel data in development, but I found that the bridge tag would be lost in the data after processing with OSM2GMNS, and I did not find the relevant method to specify the tag output.
Hi Jiawei,
Typically, the zone-to-node mapping is specified in node.csv through the field of zone_id. However, there is a challenge when mapping TAZ-based information to the network. Please add a function to map TAZ centroid to node, and update zone_id field when users have TAZ boundary information, including boundary polygon, centroid latitude and longitude.
Dr. Zhou asked me prepare the phoenix network and TAZ files for your test.
The attached TAZ.csv contains fields for zone_id, x_coord, y_coord, and geometry defined in WKT format. The geometry is typically represented using polygon geometry and a pair of x_coord and y_coord defines zone centroids.
For many use cases, it is important to get information on additional tags from OSM. One example is to identify tunnels and bridges.
So, ideally, the API would allow for something like:
og.getNetFromFile("asu.osm.pbf", tags=["bridge", "tunnel"])
Currently, only the information below is given, but we need to know the total processing time for large networks. --
Building Network from OSM file
reading osm file
parsing osm network
generating nodes and links
number of nodes: 52820, number of links: 75395, number of pois: 0
Consolidating Complex Intersections
1324 intersections have been consolidated
Outputting Network Files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.