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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Syfuhs.OpenStreetMap" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Syfuhs.OpenStreetMap" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Syfuhs.OpenStreetMap" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Syfuhs.OpenStreetMap --version 0.1.2
                    
#r "nuget: Syfuhs.OpenStreetMap, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Syfuhs.OpenStreetMap@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Syfuhs.OpenStreetMap&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Syfuhs.OpenStreetMap&version=0.1.2
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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