Hi Brett,
Attached is a patch that adds WayNode location (latitude/longitude) support to OsmosisReader. It seems to work fine. You can check it out by uncommenting the @Test annotation on the test I added and supplying the path to your own PBF file (I would have added a full unit test there, but I didn't know how you wanted to handle data for test cases in this project, so I just left it like this for now). You'll want to create your PBF file with a command similar to this: osmium add-locations-to-ways --keep-untagged-nodes -o new-mexico-latest-with-way-nodes.osm.pbf new-mexico-latest.osm.pbf Only one technical question for you: is there any way to detect from the header of the PBF file whether the file contains way node locations? It would be nice not to have to read nodes for 45 minutes before discovering that the PBF file doesn't have way node locations. Once there's an osmosis release with the way node location feature in it (and ideally a data drop with way node locations), we hope to switch to consuming only PBF files with way node locations and we'd remove support from our apps for PBF files without this information (thus the need to detect if the file has way nodes). Best, Jon ________________________________ From: Brett Henderson <br...@bretth.com> Sent: Sunday, March 4, 2018 3:40:02 PM To: Locke, Jonathan Cc: osmosis-dev@openstreetmap.org Subject: Re: [osmosis-dev] Osmosis and Osmium-enhanced PBF files with way node locations It's always nice to hear that your software is useful :-) Thanks! Yell out if you run into any problems and I'll do my best to point you in the right direction. Cheers, Brett On Fri, 2 Mar 2018 at 11:32 Locke, Jonathan <jonath...@telenav.com<mailto:jonath...@telenav.com>> wrote: Hi Brett, >From our perspective, it's definitely worth adding this feature because we use >OsmosisReader in a host of custom Java applications (dozens of them). I think >at this point, Osmosis code is running on our servers 24/7/365 doing various >kinds of back-end processing for different groups around the world. I totally understand the part about not having time. I am the author of Apache Wicket and I've stepped away from that project for what are probably similar reasons (OSS really does soak up time like mad!). So, I will spend some time developing a patch for OsmosisReader that supports this new location-enhanced format and I'll get in touch when my patch is ready for your review. With luck, I shouldn't have too many questions and the patch will be close to what you'd like. I figure I will just need to look at the proto files and maybe the osmium code and make the appropriate changes. Anyway, thanks for writing a great little library. I've had few if any problems with it and like I said, it powers a lot of what we do with OSM. Best, Jon ------ Hi Jon, It sounds like a great initiative. Linking ways to locations efficiently is perhaps the greatest challenge of working with OSM data, and the one I've spent more time on than most. Including that information in the raw data sets would be a huge boon for downstream consumers. As you may have noticed Osmosis development is fairly quiet these days. I'm not able to spend much time on it, and it doesn't see many other contributions. Unfortunately this means you'll probably be on your own. I'll do my best to answer any questions, but am unlikely to be able to help directly. I'm curious about whether it's worth adding to Osmosis. Are there many use cases that other tools like Osmium don't cover? If there are that's great, I'm a bit out of touch. Cheers, Brett _______________________________________________ osmosis-dev mailing list osmosis-dev@openstreetmap.org<mailto:osmosis-dev@openstreetmap.org> https://lists.openstreetmap.org/listinfo/osmosis-dev
osmosis-way-node-location.patch
Description: osmosis-way-node-location.patch
_______________________________________________ osmosis-dev mailing list osmosis-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/osmosis-dev