I’m confused by the two cropping operations as mentioned in the title. My goal is to obtain the roadnetwork of a certain area using open street map data.
Reference link: What's the general algorithm to draw a road network of a certain area? - #34 by ImreSamu
I download the .osm.pbf file, say a.osm.pbf from GEOFABRIK // Downloads, and then using command osmium extract --bbox 10,10,40,40 a.osm.pbf -o b.osm.pbf to extract or crop the file based on the bbox given by the four parameters. Then, I used osmium cat b.osm.pbf -o c.osm to transfer the .osm.pbf file into a different format .osm. I also have the a.osm file obtained from command osmium cat a.osm.pbf -o a.osm. The file a.osm has size roughly 600MB, while the c.osm has size roughly 100MB.
When I use c.osm with my code, during the function call get_map_data, I realized that there is the other function OpenStreetMapX.crop!(osmdata, crop_relations = false). I understand that the purpose of this function is to crop the nodes, ways, relations based on a given bounds. But I have already crop / extract based on a known bbox already using osmium commands. So I do not need this operation. Am I missing something or ? The other small/side question is, what is the relation between nodes and vertices? From my understanding, nodes are more concrete, and vertices are more abstract I guess. Nodes refer to the nodes elements in .osm file. Do I understand it correctly? Any comments are greatly appreciated indeed!
imho : the osmium extract should be enough with the default complete_ways strategy.
for extreme cases - for example - you want full ‘EuroVelo’ data ( == European cycle route network ) - you need different extraction strategy … and you have to know deeply the osm relation types …
By “car route network”, I mean “driving road/route network”. I need to simulate / visualize cars driving on a road network, from given location A to location B.
disclaimer: I have not used the OpenStreetMapX package yet … because I am mostly loading the OSM data to the Postgres/Postgis database … so probably my comments not the global optimum … sorry ;