Ben Abelshausen
Ben Abelshausen
The OSM PBF format is a bit strange, it seems to use two steps, one with raw data encoded in a protobuf message that then again is a protobuf message....
Hi, see: https://stackoverflow.com/questions/4195746/memorystream-must-be-explicitely-be-disposed
I'm assigning this to myself and have a look. An idea: We could introduce an extra object specifically for delete operations that has an implicit cast from OsmGeo for the...
I did not know QGIS could open osm pbf files. You are not talking about mvt (mapbox vector tiles) also encoded using protobuf?
It is possible QGIS doesn't support the uncompressed variety of the PBF files; try adding compress=true here: https://github.com/OsmSharp/core/blob/develop/src/OsmSharp/Streams/PBFOsmStreamTarget.cs#L57 This value isn't true by default because it would a breaking change...
Can you make a simple reproducible test, then I can have a look.
You should not filter out the Nodes here: var filtered = source.Where(x => x.Type == OsmSharp.OsmGeoType.Way); Perhaps this will work: var filtered = source.Where(x => x.Type == OsmSharp.OsmGeoType.Way || x.Type...
You can first filter out only the ways you need, look at their nodes and keep a set of node ids you need. Then do a second pass and only...
You need to check and cast to nodes, something like this should work: ``` if (osmGeo is Node n) { var latLon = (n.Latitude.value, n.Longitude.value) } ```
I think so because of this: https://github.com/OsmSharp/core/blob/develop/src/OsmSharp/Complete/Node.Complete.cs