{"id":33140372,"url":"https://github.com/BruTile/BruTile","last_synced_at":"2025-11-16T10:00:49.497Z","repository":{"id":22036770,"uuid":"25365061","full_name":"BruTile/BruTile","owner":"BruTile","description":"BruTile is a .NET library to access tile services like those of OpenStreetMap, MapBox or GeodanMaps.","archived":false,"fork":false,"pushed_at":"2025-10-27T11:21:14.000Z","size":35665,"stargazers_count":360,"open_issues_count":12,"forks_count":121,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-10-27T13:11:46.039Z","etag":null,"topics":["brutile","map","mapping","osm","tiling","tms","wms","wmts"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BruTile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"pauldendulk"}},"created_at":"2014-10-17T15:43:32.000Z","updated_at":"2025-10-27T11:21:18.000Z","dependencies_parsed_at":"2024-01-12T00:28:18.547Z","dependency_job_id":"a477e6f1-1ece-446d-bb93-ce5898e8f26d","html_url":"https://github.com/BruTile/BruTile","commit_stats":{"total_commits":1208,"total_committers":30,"mean_commits":"40.266666666666666","dds":0.5413907284768211,"last_synced_commit":"37aac17ecbdd42afc5cdfdd597662cda6ceb10e7"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/BruTile/BruTile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruTile%2FBruTile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruTile%2FBruTile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruTile%2FBruTile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruTile%2FBruTile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BruTile","download_url":"https://codeload.github.com/BruTile/BruTile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruTile%2FBruTile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284691065,"owners_count":27047743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brutile","map","mapping","osm","tiling","tms","wms","wmts"],"created_at":"2025-11-15T12:00:39.032Z","updated_at":"2025-11-16T10:00:49.458Z","avatar_url":"https://github.com/BruTile.png","language":"C#","funding_links":["https://github.com/sponsors/pauldendulk"],"categories":["Geospatial Library","C Sharp"],"sub_categories":["C Sharp"],"readme":"|   | Status  | \n| ------------- |:-------------:|\n| Build | [![Build status](https://github.com/brutile/brutile/actions/workflows/build.yml/badge.svg)](https://github.com/BruTile/BruTile/actions/workflows/build.yml?query=branch%3Amaster) |\n| NuGet BruTile | [![NuGet Status](http://img.shields.io/nuget/v/BruTile.svg?style=flat)](https://www.nuget.org/packages/BruTile/) |\n| NuGet BruTile.MbTiles | [![NuGet Status](http://img.shields.io/nuget/v/BruTile.MbTiles.svg?style=flat)](https://www.nuget.org/packages/BruTile.MbTiles/) |\n\n### BruTile\nBruTile is a .NET Standard 2.0 library to access tile services like OpenStreetMap and Bing. Such tile services store pre-rendered tiles for a certain area and for various levels of detail. BruTile helps to determine which tiles to fetch for a certain viewport of a map. \nBruTile returns tiles as raw image streams and has no dependency on a specific client platform. BruTile does not display those tiles. You need to use a mapping library like SharpMap, ArcBruTile or [Mapsui](https://github.com/Mapsui/Mapsui) or write your own code to display tiles. \n\nWhat BruTile does is:\n\n1. Helps to construct a tile source, an object that has all information about a tile service.\n2. Helps to calculate which tiles you need, given a certain map extent and a map resolution (units per pixel). \n3. Helps you fetch those tiles.\n\n### BruTile is a .NET Standard library\n\n**BruTile V4** consists of 2 nugets that support .NET Standard 2.0.\n\n| Library                  |   Targeted Framework  |\n| ------------------------ | --------------------- |\n| BruTile                  |  .NET Standard 2.0    |\n| BruTile.MbTiles          |  .NET Standard 2.0    |\n\n- Support for .NET Framework 4.5 has been removed (also the samples and tests have moved to .NET Core). \n- BruTile.Desktop and BruTile.Desktop.DbCache have been deleted and their content has moved to the BruTile nuget.\n\n### Demo\nFor a demo showing various data sources download the source code and run BruTile.Demo in the Samples folder\n\n## Getting Started\n\n### 1) Create an app and add the BruTile NuGet package\nCreate a .NET Console app in Visual Studio. Add the BruTile NuGet package. Use the package manager tools in Visual Studio or add it from the package manager console:\n```\nPM\u003e install-package BruTile \n```\n\n### 2) Create a tile source\n```c#\n// This is an example that creates the OpenStreetMap tile source:\nvar tileSource = new HttpTileSource(new GlobalSphericalMercator(0, 18),\n    \"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\",\n    new[] {\"a\", \"b\", \"c\"}, \"OSM\");\n```\n### 3) Calculate which tiles you need\n```c#\n// the extent of the visible map changes but lets start with the whole world\nvar extent = new Extent(-20037508, -20037508, 20037508, 20037508);\nvar screenWidthInPixels = 400; // The width of the map on screen in pixels\nvar resolution = extent.Width / screenWidthInPixels;\nvar tileInfos = tileSource.Schema.GetTileInfos(extent, resolution);\n```\n\n### 4) Fetch the tiles from the service\n\n```c#\nConsole.WriteLine(\"Show tile info\");\nforeach (var tileInfo in tileInfos)\n{\n    var tile = await tileSource.GetTileAsync(tileInfo);\n\n    Console.WriteLine(\n        $\"tile col: {tileInfo.Index.Col}, \" +\n        $\"tile row: {tileInfo.Index.Row}, \" +\n        $\"tile level: {tileInfo.Index.Level} , \" +\n        $\"tile size {tile.Length}\");\n}\n```\nOutput:\n```console\n    tile col: 0, tile row: 0, tile level: 1 , tile size 11276\n    tile col: 0, tile row: 1, tile level: 1 , tile size 3260\n    tile col: 1, tile row: 0, tile level: 1 , tile size 10679\n    tile col: 1, tile row: 1, tile level: 1 , tile size 4009\n```\n\n### 5) Try some of the known tile sources \n\n```c#\n// You can easily create an ITileSource for a number of predefined tile servers\n// with single line statements like:\nvar tileSource1 = KnownTileSources.Create(); // The default is OpenStreetMap\nvar tileSource2 = KnownTileSources.Create(KnownTileSource.BingAerial);\nvar tileSource3 = KnownTileSources.Create(KnownTileSource.BingHybrid);\nvar tileSource4 = KnownTileSources.Create(KnownTileSource.StamenTonerLite);\nvar tileSource5 = KnownTileSources.Create(KnownTileSource.EsriWorldShadedRelief);\n```\nThe predefined tile sources are defined in a single file. Take a look at that file [here](https://github.com/BruTile/BruTile/blob/master/BruTile/Predefined/KnownTileSources.cs) to learn how you could create any tile source.\n\n\n### 6) Use MBTiles, the sqlite format for tile data, to work with tiles stored on your device.\n\n```c#\nvar mbtilesTilesource = new MbTilesTileSource(new SQLiteConnectionString(\"Resources/world.mbtiles\", false));\nvar mbTilesTile = await mbtilesTilesource.GetTileAsync(new TileInfo { Index = new TileIndex(0, 0, 0) });\nConsole.WriteLine($\"This is a byte array of an image file loaded from MBTiles with size: {mbTilesTile.Length}\");\n```\nOutput:\n```console\nThis is a byte array of an image file loaded from MBTiles with size: 27412\n```\n\nThe above code can also be found in the BruTile sample called BruTile.GettingStarted in the Samples folder of this repository.\n\n### Supported tile service protocols:\n* [WMTS](http://www.opengeospatial.org/standards/wmts)\n* [TMS](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification)\n* [OSM](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) (Like TMS with inverted y-axis)\n* [WMS](http://www.opengeospatial.org/standards/wms) (tiled requests to a regular WMS)\n* [ArcGIS Tile Server](http://resources.arcgis.com/en/help/rest/apiref/tile.html)\n* [WMS-C](https://wiki.osgeo.org/wiki/WMS_Tile_Caching#WMS-C_as_WMS_Profile)\n\n### Roadmap\n- Stability is currently our primary focus.\n\n### Projects that use BruTile\n\n* [ArcBruTile](https://bertt.itch.io/arcbrutile) a plugin for ArcGIS\n* [SharpMap](https://github.com/SharpMap/SharpMap) a GIS library\n* [Mapsui](https://github.com/Mapsui/Mapsui) a MapComponent for Xamarin.Android. Xamarin.iOS, UWP and WPF\n* [DotSpatial](https://github.com/DotSpatial/DotSpatial) a GIS library that is used in [HydroDesktop](https://github.com/CUAHSI/HydroDesktop)\n\n### License\n[Apache 2.0](https://raw.githubusercontent.com/BruTile/BruTile/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBruTile%2FBruTile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBruTile%2FBruTile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBruTile%2FBruTile/lists"}