quantized-mesh-tile 0.4.0

dotnet add package quantized-mesh-tile --version 0.4.0                
NuGet\Install-Package quantized-mesh-tile -Version 0.4.0                
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="quantized-mesh-tile" Version="0.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add quantized-mesh-tile --version 0.4.0                
#r "nuget: quantized-mesh-tile, 0.4.0"                
#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.
// Install quantized-mesh-tile as a Cake Addin
#addin nuget:?package=quantized-mesh-tile&version=0.4.0

// Install quantized-mesh-tile as a Cake Tool
#tool nuget:?package=quantized-mesh-tile&version=0.4.0                

quantized-mesh-tile-cs

NuGet Status

A .NET 6 library for decoding a terrain tile (format quantized mesh).

More info about the quantized mesh format: https://github.com/AnalyticalGraphicsInc/quantized-mesh

For more awesome quantized mesh implementations see https://github.com/bertt/awesome-quantized-mesh-tiles

Installation

PM> Install-Package quantized-mesh-tile

History

23-05-26: release version 0.4 to .NET 6

18-12-28: release version 0.3 with BinaryReader instead of FastBinaryReader

18-12-05: release version 0.2 with new .NET project file and conversion to WGS84 (method GetTriangles) removed.

Usage

const string terrainTileUrl = @"https://geodan.github.io/terrain/samples/heuvelrug/tiles/13/8432/6467.terrain";

var client = new HttpClient();
var bytes = await client.GetByteArrayAsync(terrainTileUrl);
var stream = new MemoryStream(bytes);

var terrainTile = TerrainTileParser.Parse(stream);
Console.WriteLine("Number of vertices: " + terrainTile.VertexData.vertexCount);
Console.ReadLine();

Benchmark

|                    Method |     Mean |    Error |   StdDev |
|-------------------------- |---------:|---------:|---------:|
| ParseVectorTileFromStream | 46.74 us | 0.099 us | 0.087 us |

Sample: convert to GeoJSON

See samples/qm2geojson, sample code for converting a quantized mesh tile to GeoJSON.

Result: see https://github.com/bertt/quantized-mesh-tile-cs/blob/master/samples/qm2geojson/triangles.geojson

Sample visualization:

heightmap

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.4.0 196 5/26/2023
0.3.0 795 12/28/2018
0.2.0 740 12/5/2018
0.1.10 1,083 1/11/2017
0.1.9 978 1/10/2017
0.1.8 975 1/10/2017
0.1.7 982 1/5/2017
0.1.6 966 1/5/2017
0.1.5 1,110 1/4/2017
0.1.4 961 1/4/2017
0.1.3 1,059 1/2/2017
0.1.2 993 12/28/2016
0.1.1 1,013 12/22/2016
0.1.0 991 12/22/2016

To .NET 6.0