Syfuhs.OpenStreetMap
0.1.2
Requires NuGet 2.12 or higher.
dotnet add package Syfuhs.OpenStreetMap --version 0.1.2
NuGet\Install-Package Syfuhs.OpenStreetMap -Version 0.1.2
<PackageReference Include="Syfuhs.OpenStreetMap" Version="0.1.2" />
<PackageVersion Include="Syfuhs.OpenStreetMap" Version="0.1.2" />
<PackageReference Include="Syfuhs.OpenStreetMap" />
paket add Syfuhs.OpenStreetMap --version 0.1.2
#r "nuget: Syfuhs.OpenStreetMap, 0.1.2"
#:package Syfuhs.OpenStreetMap@0.1.2
#addin nuget:?package=Syfuhs.OpenStreetMap&version=0.1.2
#tool nuget:?package=Syfuhs.OpenStreetMap&version=0.1.2
Open Street Map Decoding
This project is a hard fork of OsmSharp. Namespace has changed to allow both to be run in the same project for comparisons. License remains the same as MIT.
- Converted to net10 instead of netstandard2.0 to take advantage of new libraries
- Rewrote PBF parser for speed and memory
- Rewrote POCO data classes for JIT initialization of data
- Converted parsing to logical OSM structure pipeline to channels and awaitables.
Background info
File Info
Format Reference (It's not the best format. It has some seriously frustrating limitations).
PBF files are hybrid protobuf formats. They are a serialized list of protobuf blocks containing dense groups of more protobuf blocks which represent entities that are nodes, ways, or relations. In graph terms you have Nodes (vertices) that are connected to other nodes through Ways (edges) that form Relationships (graphs). In geographic terms a node presents a single (X,Y) point; a way represents a line of points [(X1,Y1), (X2,Y2), ... (Xn,Yn)]; and a relationship represents a polygon of one or more lines [(X1,Y1), (X2,Y2), ... (Xn,Yn), (X1, Y1)].
The high level protobuf block is an attempt at compressing multiple similar data types into a dense grouping of data, removing duplicate metadata from the serialized format.
To decode this file you read through each block, which is length prefixed. That gives you a primitive block that might be GZipped or raw protobuf primitive groups. Each group might be a dense group of nodes or plain ways or relationships. Once you decode the protobuf entities they need to be converted into meaningful entities for conversion into geographic primitives.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CommunityToolkit.HighPerformance (>= 8.4.2)
- MemoryPack (>= 1.21.4)
- Microsoft.Extensions.ObjectPool (>= 10.0.8)
- NetTopologySuite (>= 2.6.0)
- NetTopologySuite.Features (>= 2.2.0)
- NetTopologySuite.IO.GeoJSON4STJ (>= 4.0.0)
- protobuf-net (>= 3.2.56)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Syfuhs.OpenStreetMap:
| Package | Downloads |
|---|---|
|
Syfuhs.OpenStreetMap.RocksDB
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.2 | 113 | 9/2/2026 |