ScriptHound.Dotentile 1.1.0

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

// Install ScriptHound.Dotentile as a Cake Tool
#tool nuget:?package=ScriptHound.Dotentile&version=1.1.0                

Dotentile

Dotentile is GDAL-based library to convert lat long data into XYZ tiles and vice versa.

Inspired by mercantile

Installation

dotnet add package ScriptHound.Dotentile

Examples

Converting lat lot with predefined zoom level to XYZ tiles

using Dotentile;

var lon = 39.344371f;
var lat = 72.878013f;
var zoom = 14;

var xyz = Translation.XYZFromLatLon(lat, lon, zoom);
var expected = new List<int> { 11508, 6241, 14 };

Converting XYZ tiles to lat long

var x = 11508;
var y = 6241;
var z = 14;

var latLon = Translation.LatLonFromXYZ(x, y, z);
var expected = new List<float> { 72.878013f, 39.344371f };

Getting all XYZ tiles which intersect Geojson polygon

var geoJson = "{\"type\": \"Polygon\", \"coordinates\": [[[-180, 85], [180, 85], [180, -85], [-180, -85], [-180, 85]]]}";
var zoom = 14;
var tiles = Translation.TilesFromGeojson(geoJson, zoom);

Repository

PRs and issues are welcome https://github.com/ScriptHound/dotentile

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.

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
1.1.0 160 2/6/2024
1.0.0 120 2/3/2024