A weather data tile generator for digital maps using the Web Mercator projection

Last update: Oct 31, 2021

Weather data tile generator for Web Mercator maps

This is a weather data tile generator for digital maps, which is compatible with Leaflet and in general any other mapping software capable of displaying maps from tiles with the Web Mercator projection.

For each invocation, this code will:

  1. parse the HTTP GET parameters for the Web Mercator map cartesian coordinates (x, y) for the given zoom level (z) and for the weather data type (t) of the requested tile,
  2. connect to the weather data providing server over TCP (for example, a sailnavsim-core instance) to fetch the raw weather data,
  3. and finally generate the weather tile image and output it in PNG format.

This can be run as part of an existing or a new web service (as long as it is capable of running PHP code) or as a standalone PHP program (possibly with some modifications) which outputs the PNG image binary data to stdout.

An example of some generated weather map tiles from wind data overlayed over a base map in Leaflet is shown below (as seen in the sailing navigation simulator here: https://8bitbyte.ca/sailnavsim/).

Dependencies

  • PHP
  • PHP-Imagick

Tested environments

  • PHP 7.0 on Debian 9 (Stretch), x86-64
  • PHP 7.3 on Debian 10 (Buster), x86-64

Configuration

To configure the weather data tile generator, modify the values in wxtile_config.php to point it to a running instance of a compatible weather data providing server (for example, a running instance of sailnavsim-core).

If using LeafletJS, you can simply add a new tile layer to point to your web service (as in the example shown below). Note that the values of WEB_HOST and WEB_PORT here are not the same as those configured in the wxtile_config.php file; these should point to your web service hosting the tile generator code rather than to the weather data providing server.

L.tileLayer('https://WEB_HOST:WEB_PORT/WXTILE_PATH/wxtile.php?z={z}&x={x}&y={y}&t=wind').addTo(map);

GitHub

https://github.com/ls4096/map-wxtile-generator
You might also like...

Creating a simple weather web application with Laravel rest API.

Weather Channel Creating a website for weather status, with Laravel restAPI. See the Website Weather.Channel-1.mov Features REST API Invoake Controlle

Jul 31, 2022

Collection of Google Maps API Web Services for Laravel

Collection of Google Maps API Web Services for Laravel Provides convenient way of setting up and making requests to Maps API from Laravel application.

Aug 2, 2022

Simple solution for converting excel rows into coordinates using Google Maps API

Package Usage Start by creating a new instance of ExcelToCoorindates class: $excel_to_cordinates = new ExcelToCoordinates(); Methods -setEx

Oct 16, 2021

New WordPress plugin to render a map with multiple markers using the open source maps provider OpenStreetMap

markers-on-openstreetmap New WordPress plugin to render a map with multiple markers using the open source maps provider OpenStreetMap A friend of mine

Oct 25, 2021

Open Source Data & Experience Management Platform (PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce)

Open Source Data & Experience Management Platform (PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce)

Pimcore - Open Source Data & Experience Management Platform: PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce

Aug 14, 2022

One time password generator, validator, and qrcode generator that has no web dependencies (self-contained) in PHP

One time password generator, validator, and qrcode generator that has no web dependencies (self-contained) in PHP

otp-thing One time password generator, validator, and qrcode generator that has no web dependencies (self-contained) in PHP Introduction This started

Apr 29, 2022

Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond.

About Craft CMS Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. It features: An intuitive, user-

Aug 6, 2022

CollectiveAccess is a web-based suite of applications providing a framework for management, description, and discovery of complex digital

README: Pawtucket2 version 1.7.14 About CollectiveAccess CollectiveAccess is a web-based suite of applications providing a framework for management, d

Mar 31, 2022

temperature-pi: a simple Raspberry Pi based temperature logger using a DS18B20 1-Wire digital temperature sensor, & a local sqlite database

temperature-pi: a simple Raspberry Pi based temperature logger using a DS18B20 1-Wire digital temperature sensor, & a local sqlite database

temperature-pi temperature-pi is a simple Raspberry Pi based temperature logger using a DS18B20 1-Wire digital temperature sensor, & a local sqlite da

Dec 27, 2020

Maps Laravel Eloquent models to Elasticsearch types

Elasticquent Elasticsearch for Eloquent Laravel Models Elasticquent makes working with Elasticsearch and Eloquent models easier by mapping them to Ela

Aug 10, 2022

Your laravel maps libary.

Your laravel maps libary.

Laravel map This package allows you to easily use leaflet.js or google maps to create a map in your laravel project. Installation You can install the

Aug 15, 2022

YesWiki is a wiki system written in PHP, including extensions making collaboration more simple (databases, maps, easy editing, bootstrap themes,...).

YesWiki YesWiki is a Free Software under the AGPL licence, made for creating and managing your website, in a collaborative way. YesWiki allows any web

Aug 10, 2022

Generate and display maps without external services or compromising on privacy.

Generate and display maps without external services or compromising on privacy.

Generate and display maps without external services or compromising on privacy.

Jun 24, 2022

Laravel Google Maps Package

Laravel Google Maps This repo aims to use google map features in laravel 5.x. It is easy to use and flexible, you can just install this package and en

Aug 15, 2022

An easy way to integrate Google Maps with Laravel

An easy way to integrate Google Maps with Laravel For Laravel 5.x, check version 2.35.1 For Laravel 4.x, check version 1.27.0 Think of Googlmapper as

Aug 11, 2022

Maps Railroad Online Savegames to a SVG map

RailroadOnlineMapper @ian76g#6577 Environments DEV - https://zwackelmann.online/ QA - https://ohnezahn.online/ PROD - https://minizwerg.online/ Gettin

Jan 9, 2022

Routing - The Routing component maps an HTTP request to a set of configuration variables.

Routing Component The Routing component maps an HTTP request to a set of configuration variables. Getting Started $ composer require symfony/routing

Aug 13, 2022

Google Maps Plugin for Typemill CMS.

Google Maps Plugin for Typemill CMS.

Google Maps Plugin This plugin is developed for Typemill, a flat-file cms. How to install Download this plugin (zip). Unzip the plugin. Upload the plu

Jun 1, 2022

Utilities to scan PHP code and generate class maps.

composer/class-map-generator Utilities to generate class maps and scan PHP code. Installation Install the latest version with: $ composer require comp

Aug 1, 2022
New WordPress plugin to render a map with multiple markers using the open source maps provider OpenStreetMap

markers-on-openstreetmap New WordPress plugin to render a map with multiple markers using the open source maps provider OpenStreetMap A friend of mine

Oct 25, 2021
Generate and display maps without external services or compromising on privacy.
Generate and display maps without external services or compromising on privacy.

Generate and display maps without external services or compromising on privacy.

Jun 24, 2022
Free database of geographic place names and corresponding geospatial data

FreeGeoDB Free database of geographic place names and corresponding geospatial data Entities airports cities countries (admin-0) lakes ports railroads

Jul 27, 2022
Official PHP library for IPinfo (IP geolocation and other types of IP data)

This is the official PHP client library for the IPinfo.io IP address API, allowing you to lookup your own IP address,

Aug 14, 2022
A Laravel package that uses geoPlugin web service to fetch information from an IP.

LarageoPlugin (Laravel 4 Package) A Laravel package that uses geoPlugin web service to fetch information from an IP. It will store in cache the IP inf

Feb 18, 2021
A Laravel package to get the user's country using the ip.

Laravel IP Service Tries to guess the country code of the client, using his IP. Installation Download and import the ip database from ip2nation.com Us

Apr 12, 2022
Laravel-Weather let you get weather info from qweather.com

Laravel Weather Weather info system for Laravel. Installing composer require layoute/laravel-weather -vvv Configuration and Migrations php artisan ven

May 26, 2022
A script to retrieve data from a Netatmo weather station and display it in a Mac menu bar.

weathermenu A script to retrieve data from a Netatmo weather station and display it in a Mac menu bar. Intended for use with SwiftBar. Configuration N

Nov 4, 2021
Uses internet-connectable temperature sensors to provide cooling/heating assist for small buildings, as well as weather data

ambient-hvac Uses internet-connectable temperature sensors to provide cooling/heating assist for houses and other small buildings, as well as weather

Nov 25, 2021