Utility to warm up your tile server cache

Related tags

Maps tilemantle
Overview

TileMantle

A tool to warm up your tile server cache. Give it a URL template, geometry, and list of zoom levels and it will request tiles incrementally to warm it up.

$ npm install tilemantle -g
$ tilemantle -h

Usage: tilemantle <url> [<url> ...] [options]

Options:
  --version          Display version number
  -h, --help         Display usage information
  -l, --list         Don't perform any requests, just list all tile URLs
  -z, --zoom         Zoom levels (comma separated or range)
  -e, --extent       Extent of region in the form of: nw_lat,nw_lon,se_lat,se_lon
  -p, --point        Center of region (use in conjunction with -b)
  -b, --buffer       Buffer point/geometry by an amount. Affix units at end: mi,km
  -d, --delay        Delay between requests. Affix units at end: ms,s
  -m, --method       HTTP method to use to fetch tiles
  -r, --retries      Number of retries
  -H, --header       Set request header                                        
  -c, --concurrency  Number of tiles to request simultaneously

Usage

# use a point with a 12mi radius 
$ tilemantle http://myhost.com/{z}/{x}/{y}.png --point=44.523333,-109.057222 --buffer=12mi -z 10-14

# use an extent (nw,se)
$ tilemantle http://myhost.com/{z}/{x}/{y}.png --extent=44.523333,-109.057222,41.145556,-104.801944 -z 10-14

# use a geojson geometry as bounds
$ cat region.geojson | tilemantle http://myhost.com/{z}/{x}/{y}.png -z 10-14

# use a geojson geometry as bounds + buffer by distance
$ cat region.geojson | tilemantle http://myhost.com/{z}/{x}/{y}.png --buffer=20mi -z 10-14

Contributing

Before submitting pull requests, please update the tests and make sure they all pass.

$ npm test

License

Copyright © 2015 Brian Reavis & Contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You might also like...

A simple scalable color system for designing warm welcoming, caring websites and apps.

A simple scalable color system for designing warm welcoming, caring websites and apps.

Sargam Colors A simple scalable color system for designing warm welcoming, caring websites and apps. Sargam colors are the language of the beauty, the

Nov 17, 2022

The nestjs cache module based on cache-manager & decorators 🍃

A progressive Node.js framework for building efficient and scalable server-side applications. zirus-cache zirus-cache for Nest.JS - simple and modern

May 9, 2022

Nuxt-Module, that provides a system to set shopware cache-tags for later use in e.g. a full-page cache

nuxt-shopware-caching Nuxt-Module, that provides a system to set shopware cache-tags for later use in e.g. a full-page cache. This module is meant to

Nov 8, 2022

A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling

A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling

Windshaft A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling. Can render arbitrary SQL queries Generates image and UTFGrid in

Dec 22, 2022

Serverless raster and vector map tile generation using Mapnik and AWS Lambda

tilegarden 🗺️ 🌻 Contents About Usage Deployment to AWS Additional Configuration Options Required AWS Permissions Features Configuration Selection an

Dec 22, 2022

Generate a Map Tile from a GeoTIFF File.

geotiff-tile Generate a Map Tile from a GeoTIFF File. install npm install geotiff-tile usage import { createTile } from "geotiff-tile"; createTile({

Dec 18, 2022

A remote nodejs Cached sqlite Database Server, for you to have your perfect MAP Cache Saved and useable remotely.

A remote nodejs Cached sqlite Database Server, for you to have your perfect MAP Cache Saved and useable remotely.

A remote nodejs Cached sqlite Database Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fast, stores the Cache before stopping and restores it again! it uses ENMAP

Dec 18, 2022

open-source implementation of the Turborepo custom remote cache server.

open-source implementation of the Turborepo custom remote cache server.

This project is an open-source implementation of the Turborepo custom remote cache server. If Vercel's official cache server isn't a viable option, th

Dec 30, 2022

A utility for creating toggleable items with JavaScript. Inspired by bootstrap's toggle utility. Implemented in vanillaJS in a functional style.

LUX TOGGLE Demo: https://jesschampion.github.io/lux-toggle/ A utility for creating toggleable dom elements with JavaScript. Inspired by bootstrap's to

Oct 3, 2020

Monolithic repo for api server, image server, web server

Onsecondary Market Deployed at https://market.onsecondary.com Monolithic repo for api server, image server, web server TODO -use a script to cull expi

Jan 11, 2022

A GitHub Action to cache your workload to a Google Cloud Storage bucket.

A GitHub Action to cache your workload to a Google Cloud Storage bucket.

Google Cloud Storage Cache Action GitHub already provides an awesome action to cache your workload to Azure's servers hosted in United States. However

Dec 15, 2022

proxy 🦄 yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner

proxy 🦄 yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner

proxy 🦄 yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner. Batteries are included, Content Spinning and Caching Engine, all housed within a stunning web GUI. A unique high-performance, plug-and-play, multi-threaded website mirror and article spinner

Dec 30, 2022

A small utility server to exchange data and messages between clients. Comes complete with E2E public key encryption

Zenotta Intercom A small utility server to exchange arbitrary data between clients. Comes complete with E2E public key encryption Official documentati

Oct 2, 2022

Wrap native HTTP requests with RFC compliant cache support

cacheable-request Wrap native HTTP requests with RFC compliant cache support RFC 7234 compliant HTTP caching for native Node.js HTTP/HTTPS requests. C

Dec 20, 2022

Memoize promise-returning functions. Includes cache expire and prefetch.

promise-memoize Memoize promise-returning functions. Includes cache expire and prefetch. When data expire mode enabled, new values are fetched in adva

Nov 1, 2022

Bluzelle is a smart, in-memory data store. It can be used as a cache or as a database.

SwarmDB ABOUT SWARMDB Bluzelle brings together the sharing economy and token economy. Bluzelle enables people to rent out their computer storage space

Dec 31, 2022

NodeJS PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.

Node Postgres Extras NodeJS port of Heroku PG Extras with several additions and improvements. The goal of this project is to provide powerful insights

Nov 14, 2022

Async cache with dedupe support

async-cache-dedupe async-cache-dedupe is a cache for asynchronous fetching of resources with full deduplication, i.e. the same resource is only asked

Dec 8, 2022

A lightweight way to cache on graphQL servers

A lightweight way to cache on graphQL servers

cacheflowQL What is cacheflowQL? CacheflowQL is an npm package with complex caching algorithms that provide developers deep insights into their GraphQ

Nov 16, 2022
Comments
  • try to execute titlemantle both on Windows and Mac... I receive this error:

    try to execute titlemantle both on Windows and Mac... I receive this error:

    try to execute titlemantle both on Windows and Mac... I receive this error:

    module.js:340 throw err; ^ Error: Cannot find module '../bower_components/closure-library/closure/goog/bootstrap/nodejs' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at Object. (C:\Users\dario\AppData\Roaming\npm\node_modules\tilemantle\node_modules\turf\node_modules\turf-union\node_modules\jsts\node_modules\j avascript.util\dist\javascript.util-node.min.js:42:237) at Object. (C:\Users\dario\AppData\Roaming\npm\node_modules\tilemantle\node_modules\turf\node_modules\turf-union\node_modules\jsts\node_modules\j avascript.util\dist\javascript.util-node.min.js:42:339) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)

    opened by dariocavada 4
  • Help with use for rebuilding tiles

    Help with use for rebuilding tiles

    Hello, I am managing to get the list of tiles from tilemantle, but when I run the command in tilestrata server with -H (which I was expecting to "auto refresh" the cache with new generated tiles), I see that it doesn't happen. The command:

    tilemantle http://localhost:9999/basemap-custom-1/{z}/{x}/{y}/t.png -p ... -b 14km -z 10-21 -H "X-TileStrata-SkipCache:basemap-custom-1/t.png" (ommited some stuff for simplicity).

    My tilestrata is configured like this:

    var tilestrata = require('tilestrata');
    var disk = require('tilestrata-disk');
    var sharp = require('tilestrata-sharp');
    var mapnik = require('tilestrata-mapnik');
    var dependency = require('tilestrata-dependency');
    var strata = tilestrata();
    
    // define layers
    strata.layer('basemap')
        ...
    
    strata.layer('basemap-custom-1')
        .route('*@2x.png')
            .use(disk.cache({dir: '/var/lib/tiles/basemap-custom-1'}))
            .use(mapnik({
                pathname: '/home/osboxes/dados_container_renderer_custom/stylesheet_custom.xml',
                tileSize: 512,
                scale: 2
            }))
        .route('*.png')
            .use(disk.cache({dir: '/var/lib/tiles/basemap-custom-1'}))
            .use(dependency('basemap-custom-1', '*@2x.png'))
            .use(sharp(function(image, sharp) {
                return image.resize(256);
            }));
    
    // start accepting requests
    strata.listen(9999);
    

    Did I miss something?

    Thanks in advance!

    opened by carrbrpoa 0
  • Allocation error

    Allocation error

    Hello, I have a problem with Tilemantle. Using the command:

    ./tilemantle.js http://192.168.0.1:8080/vtile/{z}/{x}/{y}/t.pbf --point=54.05,19.29 -c 8 -z 18 -b 400km
    

    causes the process to seemingly hang for a while (tilestrata server doesn't show any incoming requests) then exits with error:

    <--- Last few GCs --->
    
       22298 ms: Scavenge 1168.5 (1197.0) -> 1152.8 (1197.0) MB, 0.4 / 0 ms (+ 394.6 ms in 240 steps since last GC) [allocation failure].
       24622 ms: Scavenge 1205.9 (1235.0) -> 1190.1 (1235.0) MB, 0.5 / 0 ms (+ 396.3 ms in 240 steps since last GC) [allocation failure].
       27301 ms: Scavenge 1243.3 (1273.0) -> 1227.6 (1273.0) MB, 0.4 / 0 ms (+ 660.3 ms in 240 steps since last GC) [allocation failure].
    
    
    <--- JS stacktrace --->
    
    ==== JS stack trace =========================================
    
    Security context: 0x1aac958b4629 <JS Object>
        1: polyRingCover(aka polyRingCover) [/home/osmdebian/node/osm-warmer/node_modules/tilemantle/node_modules/tile-cover/index.js:~116] [pc=0x923dd94a5b8] (this=0x1aac958041b9 <undefined>,tileHash=0x1aac95881231 <an Object with map 0xeb0aa7afa31>,geom=0x1aac95881321 <JS Array[1]>,max_zoom=18)
        2: getLocked(aka getLocked) [/home/osmdebian/node/osm-warmer/node_modules/tilemantle/node_modules/t...
    
    FATAL ERROR: invalid table size Allocation failed - process out of memory
    

    -c 8 parameter seems to make a difference - if I omit it the tilestrata server serves a couple of tiles then stalls and exits with above message. Actually the problem is present from zoom level 12, both for raster and vector layers. Is there something I can do to alleviate the problem?

    opened by forsetius 0
  • Unable to generate map tiles

    Unable to generate map tiles

    Hello

    i have problem with command

    tilemantle http://IP:8080/pluto/{z}/{x}/{y}/tile.png --extent=12.09,51.06,18.87,48.55 --zoom=8-10

    /usr/local/lib/node_modules/tilemantle/node_modules/turf/node_modules/turf-merge/index.js:55 var merged = clone(polygons.features[0]), ^ TypeError: Cannot read property '0' of undefined at Object.module.exports as merge at determineGeometry (/usr/local/lib/node_modules/tilemantle/bin/tilemantle.js:128:18) at /usr/local/lib/node_modules/tilemantle/node_modules/async/lib/async.js:610:21 at /usr/local/lib/node_modules/tilemantle/node_modules/async/lib/async.js:249:17 at iterate (/usr/local/lib/node_modules/tilemantle/node_modules/async/lib/async.js:149:13) at /usr/local/lib/node_modules/tilemantle/node_modules/async/lib/async.js:160:25 at /usr/local/lib/node_modules/tilemantle/node_modules/async/lib/async.js:251:21 at /usr/local/lib/node_modules/tilemantle/node_modules/async/lib/async.js:615:34 at ReadStream. (/usr/local/lib/node_modules/tilemantle/bin/tilemantle.js:91:5) at ReadStream.EventEmitter.emit (events.js:92:17)

    Can you help me with this problem ? Thank you Marek

    opened by mfeuermann 1
Releases(v1.0.3)
  • v1.0.3(Apr 10, 2015)

  • v1.0.2(Feb 18, 2015)

  • v1.0.0(Feb 17, 2015)

    • Added support for multiple url templates. E.g. tilestrata http://... http://... [options]. This is for when you have multiple variations of a tile (different formats, different resolutions) that you want warmed up at the same time.
    • Added -H, --header option for setting request options
    • Removed --ua option (just use -H "User-Agent: ...")
    Source code(tar.gz)
    Source code(zip)
Owner
Natural Atlas
Plan and record your next outdoor adventure using Natural Atlas – online and in your pocket with the Natural Atlas iOS App.
Natural Atlas
A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling

Windshaft A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling. Can render arbitrary SQL queries Generates image and UTFGrid in

CARTO 306 Dec 22, 2022
Serverless raster and vector map tile generation using Mapnik and AWS Lambda

tilegarden ??️ ?? Contents About Usage Deployment to AWS Additional Configuration Options Required AWS Permissions Features Configuration Selection an

Azavea 89 Dec 22, 2022
Utility to explode ArcGIS geometries into individual, component geometries

@odoe/explode A small utility to explode ArcGIS geometries into individual, component geometries. Inspired by the Explode utility of ArcGIS Desktop Po

Rene Rubalcava 6 Jul 11, 2022
Lightweight Node.js isochrone map server

Galton Lightweight Node.js isochrone server. Build isochrones using OSRM, Turf and concaveman. Francis Galton is the author of the first known isochro

Urbica 266 Dec 17, 2022
WMS server using node-mapnik

landspeed.js A simple WMS server written in node.js Only supports WMS 1.1 GetMap requests (bbox, width, height, and srs). Requirements Node.js 0.10.x

Dane Springmeyer 52 Jul 21, 2022
re:places is a serverless database of 41,000 global cities for your browser

An in-cache, searchable database of 41,000 global cities. It’s designed as a light-weight polyfill for ‘cities’ in Algolia's places API, for when it sunsets in May 2022

null 21 Dec 9, 2022
A remote nodejs Cache Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fast, stores the Cache before stopping and restores it again!

remote-map-cache A remote nodejs Cache Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fa

Tomato6966 8 Oct 31, 2022
Simple CLI to warm the cache of social images in all pages from a sitemap.

warm-social-images Simple CLI to warm the cache of social images in all pages from a sitemap. Why Using serverless functions to generate images for so

Travis Fischer 9 Jul 7, 2022
A TurboRepo local cache server which uploads artifact cache to GH artifacts.

TurboRepo Github Artifacts action This action allows you use Github artifacts as TurboRepo remote cache server. How it works? It's starts a local Turb

Felix Mosheev 65 Dec 18, 2022
A pluggable Node.js map tile server.

TileStrata TileStrata is a pluggable "slippy map" tile server that emphasizes code-as-configuration. The primary goal is painless extendability. It's

Natural Atlas 409 Dec 30, 2022