Coder Social home page Coder Social logo

mbutil's Introduction

MBUtil

MBUtil is a utility for importing and exporting the MBTiles format, typically created with Mapbox TileMill.

Before exporting tiles to disk, see if there's a Mapbox Hosting plan or an open source MBTiles server implementation that works for you - tiles on disk are notoriously difficult to manage.

Build Status

Note well: this project is no longer actively developed. Issues and pull requests will be attended to when possible, but delays should be expected.

Installation

Git checkout (requires git)

git clone https://github.com/mapbox/mbutil.git
cd mbutil
# get usage
./mb-util -h

Then to install the mb-util command globally:

sudo python setup.py install
# then you can run:
mb-util

Python installation (requires easy_install)

easy_install mbutil
mb-util -h

Usage

$ mb-util -h
Usage: mb-util [options] input output

Examples:

    Export an mbtiles file to a directory of files:
    $ mb-util world.mbtiles tiles # tiles must not already exist

    Import a directory of tiles into an mbtiles file:
    $ mb-util tiles world.mbtiles # mbtiles file must not already exist

Options:
  -h, --help            Show this help message and exit
  --scheme=SCHEME       Tiling scheme of the tiles. Default is "xyz" (z/x/y),
                        other options are "tms" which is also z/x/y
                        but uses a flipped y coordinate, and "wms" which replicates
                        the MapServer WMS TileCache directory structure "z/000/000/x/000/000/y.png"''',
                        and "zyx" which is the format vips dzsave --layout google uses.
  --image_format=FORMAT
                        The format of the image tiles, either png, jpg, webp or pbf
  --grid_callback=CALLBACK
                        Option to control JSONP callback for UTFGrid tiles. If
                        grids are not used as JSONP, you can
                        remove callbacks specifying --grid_callback=""
  --do_compression      Do mbtiles compression
  --silent              Dictate whether the operations should run silently


Export an `mbtiles` file to files on the filesystem:

    mb-util World_Light.mbtiles adirectory


Import a directory into a `mbtiles` file

    mb-util directory World_Light.mbtiles

Requirements

  • Python >= 2.6

Metadata

MBUtil imports and exports metadata as JSON, in the root of the tile directory, as a file named metadata.json.

{
    "name": "World Light",
    "description": "A Test Metadata",
    "version": "3"
}

Testing

This project uses nosetests for testing. Install nosetests:

pip install nose

or

easy_install nose

Then run:

nosetests

See Also

License

BSD - see LICENSE.md

Authors

  • Tom MacWright (tmcw)
  • Dane Springmeyer (springmeyer)
  • Mathieu Leplatre (leplatrem)

mbutil's People

Contributors

afieldthomas avatar andrewharvey avatar boomka avatar bradh avatar calvinmetcalf avatar csomerlot avatar dhcole avatar e-n-f avatar friedbunny avatar himaps avatar jameslmilner avatar jfirebaugh avatar joykuotw avatar jqtrde avatar klokan avatar leplatrem avatar manelclos avatar ntakouris avatar perrygeo avatar petropavel13 avatar roblabs avatar rouault avatar schwanksta avatar sgillies avatar tmcw avatar yellow-sky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mbutil's Issues

Can't get this to work correctly in Windows

Hi, when i run this in windows it just runs and then doesn't have an output. I would like to work on this code, but I am not sure what branch to work on once I fork this?

mb-util with an interactive layer gives the following error

I'm using stock python 2.6.5 on Ubuntu Lucid and while unpacking a mbtiles file with an interactive layer I get the following:

Traceback (most recent call last):
  File "/usr/local/bin/mb-util", line 49, in <module>
    mbtiles_to_disk(mbtiles_file, directory_path, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/mbutil/util.py", line 248, in mbtiles_to_disk
    tile_row = %(tile_row)d;''' % locals())
KeyError: 'tile_row'

I noticed this doesn't work on Snow Leopard but does on Lion using python 2.7.1 so I used pythonbrew to install and got the following:

Traceback (most recent call last):
  File "/home/deploy/.pythonbrew/pythons/Python-2.7.1/bin/mb-util", line 49, in <module>
    mbtiles_to_disk(mbtiles_file, directory_path, **options.__dict__)
  File "/home/deploy/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/mbutil/util.py", line 248, in mbtiles_to_disk
    tile_row = %(tile_row)d;''' % locals())
KeyError: 'tile_row'

Any suggestions on how to fix? Thank you in advance for the help.

Installing Boost 1.46

I am either installing Boost 1.46 wrong or it is not finishing the installation correctly. I have tried compiling and also pulling it in from a repository using apt-get. I get some weird errors about it finding Property-Tree.

What is the recommend way for installing Boost? Any pointers to follow? Compile flags that should be used? I am using Ubuntu 10.10.

Additional documentation on how to build the supporting libraries would be very helpful.

Always write required fields

MBTiles has a few required fields for the metdata table and mbutil should probably not output a MBTiles files that don't have them. We could either assume defaults or require that the user provide a metdata.json file and bail if it's missing.

What to do after you export mbtiles file to directory?

I have the following code from Mapbox site. I also used the mbutil function to export my .mbtiles file. My question is, how do I use the directory of files created by mbutil?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>MapBox Tileset Demo</title>
    <script src="http://www.openlayers.org/dev/OpenLayers.js"></script>
    <script type="text/javascript">

      var map;
      OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
      OpenLayers.ImgPath = "http://js.mapbox.com/theme/dark/";
      function init(){

        // Customize the values below to change the tileset.
        // This information is available on each tileset page.
        var layername = 'world-light';
        var file_extension = 'png';

        // Build the map
        var options = {
          projection: new OpenLayers.Projection("EPSG:900913"),
          displayProjection: new OpenLayers.Projection("EPSG:4326"),
          units: "m",
          numZoomLevels: 12,
          maxResolution: 156543.0339,
          maxExtent: new OpenLayers.Bounds(
            -20037500,
            -20037500,
            20037500,
            20037500
          )
        };
        map = new OpenLayers.Map('map', options);

        // Layer definitions
        var layer = new OpenLayers.Layer.TMS(
          "MapBox Layer",
          [ "http://a.tile.mapbox.com/","http://b.tile.mapbox.com/",
            "http://c.tile.mapbox.com/","http://d.tile.mapbox.com/" ],
          { 'layername': layername, 'type': file_extension }
        );

        // Add layers to the map
        map.addLayers([ layer ]);

        // Set the map's initial center point
        map.setCenter(new OpenLayers.LonLat(0, 0), 1);
      }

    </script>
  </head>
  <body onload="init()">
    <div id="map" style="width: 500px; height: 300px"></div>
  </body>
</html>

Wrong Z Nr.

Dear Devs,

I seem to have a strange issue with MB-Util, something that has not happened until now.

The import Row Numbers seem to be wrong.

For instance I have
xyz = 9/278/333

Yet in the MBTiles I see

9/278/177 :(

Thx,

MaC

mbtile file gdal ERROR 6: Unsupported tile characteristics

I am having trouble with the generated mbtiles file when using mb-util from the command line. I have a metadata.json in the folder/ and tiles are all inserted without error. I am unsure why gdal cannot recognize this file (nor qgis) and gdal is updated and normally reads mbtile files.

mb-util folder/ foo.mbtiles     (where folder has the structure: folder/z/x/y)
...
DEBUG:mbutil.util:tiles (and grids) inserted.
DEBUG:mbutil.util:analyzing db
DEBUG:mbutil.util:cleaning db
829400 tiles inserted (1655 tiles/sec)
$ gdalinfo foo.mbtiles 
ERROR 6: Unsupported tile characteristics
gdalinfo failed - unable to open 'foo.mbtiles'.

Output images all 0 bytes (Ubuntu 10.10)

mbutils compiled without any warnings. mbutil --input file.mbtiles --output dir on a number of valid mbtiles gives me the expected metadata.geojson, but a directory of 0 byte pngs. There is no console output when running the command.

mbutil not Exporting using bbox

can mbtiles be used to export tiles in a particular extent? I am doing the same thing using bbox but it is exporting all the tiles but not in the particular extent.

let us know the use of bbox and tile_bbox in mbutil or how can we export tiles in particular extent.

Is the XYZ the default scheme now?

I've read some previous issues but I am not sure that XYZ is the current default scheme.

In my case, I generated a mbtile file from my web tiles in XYZ scheme (builded from Maperitive software). I'm not sure whether the mbtile generated is on the XYZ scheme too. I said that because Iยดve uploaded my mbtile on MapBox and the result was a confusing map, the tiles were exchanged. The javascript code says that the scheme is XYZ and shows follow code: "tiles": ["/v3/gilliardlopes.ubtest/{z}/{x}/{y}.png"]}.

My feeling is that the mbtile is on the TMS scheme and the MapBox are trying to build the map on XYZ schema.

Has anyone experienced this?

Thanks in advance.

Support --image_format option

Would be great to be able to pass something like --image_format='jpg' as an option for simple directories without metadata files. Currently you can search and replace 'png' with 'jpg' in util.py, but the option would be helpful.

Usable as a library?

I would like to use this code as a Python module to enable MBTiles writing to a tool I use to render tilesets. The problem is that some parts of the module (all inside the mbutil directory) is assuming it's only part of the mb-util script. For instance:

https://github.com/mapbox/mbutil/blob/master/mbutil/util.py#L41

This should be handled in the util's code. Probably others are to follow.

On the other hand, there are no functions to be able to read/write individual tiles, which could be refactored from the current code.

I plan to start a PR soon, but I would like to hear your opinions on this.

Set OSM scheme by default

I wonder why the TMS scheme is used by default, quite disturbing since most tiles layers (leaflet, modestmaps, ...) have ('zxy', 'osm', =slippy map) by default...

(this is not really an issue, just would love to get have explanation/discussion)

Tiles in the wrong projection/dont line up? (mbtiles mbutil openlayers.tms)

I am having trouble taking my tilemill project to my webserver and using OpenLayers to draw my map.

We are using tilemill to style the map > mbtiles export > mbutil to directory > openlayers.tms

I have attached below the code we are using, which is a modification of the OpenLayers.TMS example.

Here is the link to my map and you will see the problem, first hand:

http://wrimaptube.nfshost.com/openlayers/examples/tms_mbtiles.html

<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Tiled Map Service Example</title>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 0;
var lat = 0;
var zoom = 0;
var map, layer;

function init(){
    OpenLayers.ImgPath = "http://js.mapbox.com/theme/dark/";
    map = new OpenLayers.Map( 'map', {maxResolution:1.40625/2} );
    layer = new OpenLayers.Layer.TMS( "ttc",
            "http://wrimaptube.nfshost.com/ttctiles3/", {layername: 'ttc3', type:'png'} );
    map.addLayer(layer);
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
function addTMS() {
    l = new OpenLayers.Layer.TMS(
        OpenLayers.Util.getElement('layer').value,
        OpenLayers.Util.getElement('url').value,
        {
            'layername': OpenLayers.Util.getElement('layer').value,
            'type': OpenLayers.Util.getElement('type').value
    });
    map.addLayer(l);
    map.setBaseLayer(l);
}
</script>
</head>
<body onload="init()">
<div id="map" style='width: 1024px; height : 500px;'>
</div>
</body>
</html>

Cheers for the help,
Michael Markieta

Disk to MBTiles - which schema to use?

I know I'm likely beating a dead horse, but I'm still a bit confused about converting disk tiles to MBTiles when my disk tiles are stored as XYZ. In my case, I'm generating pixel level UTFGrid tiles through some custom code and exporting them to disk in XYZ schema. When I go to convert these disk tiles to MBTiles and use this syntax:

mb-util --scheme=xyz disk_dir foo.mbtiles

the tiles are stored in the mbtiles file as TMS due to these lines. But if I use --scheme=tms the Y flip is avoided and the tiles get stored as XYZ in mbtiles.

In looking through mapbox.js 2.2.3, I'm not seeing where the scheme of Grid layers is being read in (ie. specifying scheme: tms or scheme: xyz has no effect) and if the tiles are not stored in XYZ they don't display correctly. I may be completely off base - but wondering if something has changed between #33 and now.

Export to WMS TileCache scheme \Z\000\000\X\000\000\Y.png

I'd like to be able to pre-seed my MapServer TileCache from a MBTiles export from TileMill. Right now the only options are to export to the basic 3 folder structure TMS formats.

Not sure if this is difficult or not to implement? I am looking for this since TileCache blows up with Internal Server Errors when mod_python requests multiple successive images from the sqlite db.

cannot complete mbtiles to TMS conversion

I have a 221 MB mbtiles, running, mbutil.py ph_forest_74e36f.mbtiles ph_forest

I get this error:
320291 / 588376 tiles exportedTraceback (most recent call last):
File "/usr/local/bin/mbutil.py", line 5, in
pkg_resources.run_script('mbutil==0.0.1', 'mbutil.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script

File "/usr/local/lib/python2.7/dist-packages/mbutil-0.0.1-py2.7.egg/EGG-INFO/scripts/mbutil.py", line 206, in
mbtiles_to_disk(mbtiles_file, directory_path)
File "/usr/local/lib/python2.7/dist-packages/mbutil-0.0.1-py2.7.egg/EGG-INFO/scripts/mbutil.py", line 186, in mbtiles_to_disk
f.close()
IOError: [Errno 30] Read-only file system
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 57, in apport_excepthook

File "/usr/lib/python2.7/dist-packages/apport/init.py", line 1, in

File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in

ImportError: cannot import name ExpatError

Original exception was:
Traceback (most recent call last):
File "/usr/local/bin/mbutil.py", line 5, in
pkg_resources.run_script('mbutil==0.0.1', 'mbutil.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script

File "/usr/local/lib/python2.7/dist-packages/mbutil-0.0.1-py2.7.egg/EGG-INFO/scripts/mbutil.py", line 206, in
mbtiles_to_disk(mbtiles_file, directory_path)
File "/usr/local/lib/python2.7/dist-packages/mbutil-0.0.1-py2.7.egg/EGG-INFO/scripts/mbutil.py", line 186, in mbtiles_to_disk
f.close()
IOError: [Errno 30] Read-only file system

RFE: import directory with PNG **and** JPEG files into single MBTiles database

Not sure is MBTiles authors intended to store different types of images in single MBTiles database, but we store tiles with alpha in PNG format, and other tiles in JPEG format (since out data is orthophoto imagery that may be and better to be stored in lossy format).
So for me it would be better to specify list of acceptable image formats in --image_format argument.

new mbtiles export to tms not working in openlayers

I have previous mbtiles exported to TMS for use in Openlayers, following the instructions here:
#16

I have a working Openlayers instance with my TMS overlay.

I created a new mbtiles using the latest tilemill and then exported it again to TMS with mbutil. But the OL code is not working anymore. Checking on the subdirectories on my old and new tms, it seems the same except for the metadata.json

old file:
{"name": "un_rivers_label", "bounds": "116.63212537765496,4.0636545687393815,127.42069959640494,19.147174999388017", "version": "1.0.0", "formatter": null, "type": "overlay", "description": ""}

new file:
{"name": "ph_base", "bounds": "115.8561301173281,3.9994194409869204,128.2926535548281,21.53824012887378", "version": "1.0.0", "formatter": null, "type": "baselayer", "description": ""}

mb-util never calls compression_do/compression_finalize

I mentioned this in another issue so feel free to remove the duplicate but if judging from the the git commits, mbutil/util_py was updated THREE months ago (and this has the compression_do/compression_finalize) BUT the mb-util script itself was updated FOUR months ago, and sure enough it doesn't call those methods.

Since I use mb-util directly the generated .mbtiles file hence never has the new compression.

Can you guys fix this please ?

Export to other format than png doesnt work

mb-util ~/Desktop/Leaflet/hh.mbtiles ~/Desktop/Leaflet/Test2 --image_format jpg

Creates files with the extension .jpg but they are no jpegs.
screenshot from 2014-12-24 14 56 20

If you rename the files to .png they work.

Tiles all corrupt when exporting from mbtiles created in Mapbox Studio

I added a geotiff to a Mapbox Studio project, created an mbtiles file from it, and when I tried to export this to tiles, every image was corrupt. I tried a different geotiff with the same result. It didn't matter if my image_format was jpg or png, still the same problem. Any ideas?

Don't output debug log by default

Debug output is too verbose, I suggest to add option like -v ("verbose") or -d ("debug") and only with it use DEBUG logging level.

Would it be possible to create uncompressed .pbf from an .mbtiles

Hi,

When extracting the tiles as .pbf from an .mbtiles these seems to be ziped. Before being able to consume them from a client using .js they need to be uncompressed first. Would it be possible to have an option to produce uncompressed .pbf ? This way the process of creating uncompressed .pbf can be done in one step.

Thanks

Error handling

A while back the --scheme arguments were changed from taking 'osm' to taking 'xyz.'

Well, some tutorials on the web never changed with it: http://build-failed.blogspot.com/2012/03/custom-map-tiles-part-2-tilemill.html

As a result, I was banging my head against the wall for a while wondering why I was staring at a working widget with no map tiles. What had actually happened was that the scheme the tiles were stored in and the scheme Leaflet was trying to use were not the same.

It would be a nice thing for users if the script checked the argument it was being passed to make sure it was a valid one, and throw an error to put wayward users on the right path.

Using interactivity layer

Regarding to issue #7
Can someone please explain how do i use the grid.json files i got after exporting on Wax?
I'm trying to create a Wax modest map with static tiles I made using mbutil. Seeing that the code exports also the json info i'm wandring how can I use it to add an interaction layer that i created using tilemill.

<html>
  <head>
    <script src='ext/modestmaps.min.js' type='text/javascript'></script>
    <script src='dist/wax.mm.js' type='text/javascript'></script>
    <link href='theme/controls.css' rel='stylesheet' type='text/css' />
    </head>
    <body>
        <div id="modestmaps-setup"></div>
        <script>
        var tilejson = {
          tilejson: '1.0.0',
          scheme: 'tms',
          tiles: ['t1/1.0.0/t1/{z}/{x}/{y}.png'],
            grids: ['t1/1.0.0/t1/{z}/{x}/{y}.grid.json']
        };
        var mm = com.modestmaps;
        var m = new mm.Map('modestmaps-setup',
          new wax.mm.connector(tilejson),           
          new mm.Point(240,240));
         //Adding interaction doesn't seem to work. any ideas?
            wax.mm.interaction(m, tilejson);
        m.setCenterZoom(new mm.Location(39, -98), 2);
        </script>

    </body>
</html>

pbf format not documented ?

Hi,

is pbf format not supported any more or the doc for the command line needed to be updated ?
--image_format=pbf

In the doc it describes 'image_format' option as "The format of the image tiles, either png or jpg".

Thanks

How to export a (osm2vectors) mbtiles to png ?

Hello,

How to export a mbtiles to png ?
I'm using mbutil ( https://github.com/mapbox/mbutil ) but we can't open the png generated.
The file could not be opened. It may be damaged ...

Thank you

Metadata.json

{
    "attribution": "<a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap contributors</a>", 
    "description": "Extract from http://osm2vectortiles.org", 
    "format": "pbf", 
    "filesize": "7856294912", 
    "basename": "canada.mbtiles", 
    "minzoom": "0", 
    "name": "osm2vectortiles", 
    "json": "{\"_prefs\":{\"disabled\":[],\"inspector\":false,\"mapid\":\"\",\"rev\":\"\",\"saveCenter\":true},\"Layer\":[{\"id\":\"landuse\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(MAX(osm_id), true) AS osm_id, ST_CollectionExtract(ST_Collect(geometry), 3) AS geometry, landuse_class(type) AS class, type\\n  FROM (\\n    SELECT osm_id, geometry, type\\n    FROM landuse_z5toz6\\n    WHERE z(!scale_denominator!) BETWEEN 5 AND 6\\n    UNION ALL\\n    SELECT osm_id, geometry, type\\n    FROM landuse_z7toz8\\n    WHERE z(!scale_denominator!) BETWEEN 7 AND 8\\n  ) AS landuse_z5toz8\\n  WHERE geometry && !bbox!\\n  GROUP BY type\\n  UNION ALL\\n  SELECT\\n    osm_ids2mbid(osm_id, true) AS osm_id,\\n    CASE WHEN ST_Area(geometry) > 10000000\\n         THEN ST_Intersection(ST_MakeValid(geometry), !bbox!)\\n         ELSE geometry\\n    END AS geometry,\\n    landuse_class(type) AS class, type\\n    FROM (\\n      SELECT osm_id, geometry, type\\n      FROM landuse_z9\\n      WHERE z(!scale_denominator!) = 9\\n      UNION ALL\\n      SELECT osm_id, geometry, type\\n      FROM landuse_z10\\n      WHERE z(!scale_denominator!) = 10\\n      UNION ALL\\n      SELECT osm_id, geometry, type\\n      FROM landuse_z11\\n      WHERE z(!scale_denominator!) = 11\\n      UNION ALL\\n      SELECT osm_id, geometry, type\\n      FROM landuse_z12\\n      WHERE z(!scale_denominator!) = 12\\n      UNION ALL\\n      SELECT osm_id, geometry, type\\n      FROM landuse_z13toz14\\n      WHERE z(!scale_denominator!) BETWEEN 13 AND 14\\n    ) AS landuse_z9toz14\\n    WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: agriculture, cemetery, glacier, grass, hospital, industrial, park, parking, piste, pitch, rock, sand, school, scrub, wood, aboriginal lands\",\"type\":\"OSM tag, more specific than class\"},\"properties\":{\"buffer-size\":4,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"landuse\"},{\"id\":\"waterway\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, false) AS osm_id, geometry, type, type AS class\\n  FROM (\\n    SELECT *\\n    FROM waterway_z7toz9\\n    WHERE z(!scale_denominator!) BETWEEN 7 AND 9\\n    UNION ALL\\n    SELECT *\\n    FROM waterway_z10toz12\\n    WHERE z(!scale_denominator!) BETWEEN 10 AND 12\\n    UNION ALL\\n    SELECT *\\n    FROM waterway_z13\\n    WHERE z(!scale_denominator!) = 13\\n    UNION ALL\\n    SELECT *\\n    FROM waterway_z14\\n    WHERE z(!scale_denominator!) = 14\\n  ) AS waterway\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: river, canal, stream, stream_intermittent, ditch, drain\",\"type\":\"One of: river, canal, stream, ditch, drain\"},\"properties\":{\"buffer-size\":4,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"waterway\"},{\"id\":\"water\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT\\n    osm_ids2mbid(osm_id, true) AS osm_id,\\n    CASE WHEN ST_Area(geometry) > 10000000 AND osm_id <> 0\\n         THEN ST_Intersection(ST_MakeValid(geometry), !bbox!)\\n         ELSE geometry\\n    END AS geometry\\n  FROM (\\n    SELECT osm_id, geometry\\n    FROM water_z0\\n    WHERE z(!scale_denominator!) = 0\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z1\\n    WHERE z(!scale_denominator!) = 1\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z2toz3\\n    WHERE z(!scale_denominator!) BETWEEN 2 AND 3\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z4\\n    WHERE z(!scale_denominator!) = 4\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z5toz7\\n    WHERE z(!scale_denominator!) BETWEEN 5 AND 7\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z8toz10\\n    WHERE z(!scale_denominator!) BETWEEN 8 AND 10\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z11toz12\\n    WHERE z(!scale_denominator!) BETWEEN 11 AND 12\\n    UNION ALL\\n    SELECT osm_id, geometry\\n    FROM water_z13toz14\\n    WHERE z(!scale_denominator!) BETWEEN 13 AND 14\\n  ) AS water\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{},\"properties\":{\"buffer-size\":8,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"water\"},{\"id\":\"aeroway\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, is_polygon(geometry)) AS osm_id, geometry, type\\n  FROM (\\n    SELECT *\\n    FROM aeroway_z9\\n    WHERE z(!scale_denominator!) = 9\\n    UNION ALL\\n    SELECT *\\n    FROM aeroway_z10toz14\\n    WHERE z(!scale_denominator!) BETWEEN 10 AND 14\\n  ) AS aeroway\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"type\":\"One of: runway, taxiway, apron\"},\"properties\":{\"buffer-size\":4,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"aeroway\"},{\"id\":\"barrier_line\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, is_polygon(geometry)) AS osm_id, geometry, barrier_line_class(type) AS class\\n  FROM barrier_line_z14\\n  WHERE geometry && !bbox!\\n    AND z(!scale_denominator!) = 14\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: fence, hedge, cliff, gate\"},\"properties\":{\"buffer-size\":4,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"barrier_line\"},{\"id\":\"building\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, geometry, building_is_underground(underground) AS underground\\n  FROM (\\n    SELECT osm_id, geometry, underground\\n    FROM building_z13\\n    WHERE z(!scale_denominator!) = 13\\n    UNION ALL\\n    SELECT osm_id, geometry, underground\\n    FROM building_z14\\n    WHERE z(!scale_denominator!) = 14\\n  ) AS building\\n  WHERE geometry && !bbox!\\n  ORDER BY ST_YMin(ST_Envelope(geometry)) DESC\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"underground\":\"Text. Whether building is underground. One of: 'true', 'false'\"},\"properties\":{\"buffer-size\":2,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"building\"},{\"id\":\"landuse_overlay\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT\\n    osm_ids2mbid(osm_id, true) AS osm_id,\\n    CASE WHEN ST_Area(geometry) > 10000000\\n         THEN ST_Intersection(ST_MakeValid(geometry), !bbox!)\\n         ELSE geometry\\n    END AS geometry,\\n    landuse_overlay_class(type) AS class, type\\n  FROM (\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z5\\n    WHERE z(!scale_denominator!) = 5\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z6\\n    WHERE z(!scale_denominator!) = 6\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z7\\n    WHERE z(!scale_denominator!) = 7\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z8\\n    WHERE z(!scale_denominator!) = 8\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z9\\n    WHERE z(!scale_denominator!) = 9\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z10\\n    WHERE z(!scale_denominator!) = 10\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z11toz12\\n    WHERE z(!scale_denominator!) BETWEEN 11 AND 12\\n    UNION ALL\\n    SELECT osm_id, geometry, type FROM landuse_overlay_z13toz14\\n    WHERE z(!scale_denominator!) BETWEEN 13 AND 14\\n  ) AS landuse_overlay\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: national_park, wetland, wetland_noveg\",\"type\":\"OSM tag, more specific than class\"},\"properties\":{\"buffer-size\":8,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"landuse_overlay\"},{\"id\":\"road\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_id, geometry, type, class, oneway, structure FROM (\\n      SELECT osm_ids2mbid(MAX(osm_id), false) AS osm_id, ST_CollectionExtract(ST_Collect(geometry), 2) AS geometry,\\n      road_type(road_class(type, NULL, NULL), type, NULL, NULL, NULL) AS type,\\n      road_class(type, NULL, NULL) AS class, road_oneway(0) AS oneway, 'none' AS structure, NULL AS z_order\\n      FROM (\\n        SELECT * FROM road_z5\\n        WHERE z(!scale_denominator!) = 5\\n        UNION ALL\\n        SELECT * FROM road_z6toz7\\n        WHERE z(!scale_denominator!) BETWEEN 6 AND 7\\n        UNION ALL\\n        SELECT * FROM road_z8toz9\\n        WHERE z(!scale_denominator!) BETWEEN 8 AND 9\\n        UNION ALL\\n        SELECT * FROM road_z10\\n        WHERE z(!scale_denominator!) = 10\\n      ) AS road_grouped_zoom_levels\\n      WHERE geometry && !bbox!\\n      GROUP BY type\\n      UNION ALL\\n      SELECT osm_ids2mbid(osm_id, is_polygon(geometry)) AS osm_id, geometry,\\n      road_type(road_class(type, service, access), type, construction, tracktype, service) AS type,\\n      road_class(type, service, access) AS class, road_oneway(oneway) AS oneway, structure, z_order\\n       FROM (\\n        SELECT * FROM road_z11\\n        WHERE z(!scale_denominator!) = 11\\n        UNION ALL\\n        SELECT * FROM road_z12\\n        WHERE z(!scale_denominator!) = 12\\n        UNION ALL\\n        SELECT * FROM road_z13\\n        WHERE z(!scale_denominator!) = 13\\n        UNION ALL\\n        SELECT * FROM road_z14\\n        WHERE z(!scale_denominator!) = 14\\n       ) AS t2\\n      WHERE geometry && !bbox!\\n      ORDER BY z_order ASC\\n   ) AS ordered_roads\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: 'motorway', 'motorway_link', 'trunk', 'primary', 'secondary', 'tertiary', 'link', 'street', 'street_limited', 'pedestrian', 'construction', 'track', 'service', 'ferry', 'path', 'golf'\",\"oneway\":\"Text. Whether traffic on the road is one-way. One of: 'true', 'false'\",\"structure\":\"Text. One of: 'none', 'bridge', 'tunnel', 'ford'. Available from zoom level 13+.\",\"type\":\"In most cases, values will be that of the primary key from OpenStreetMap tags.\"},\"properties\":{\"buffer-size\":4,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"road\"},{\"id\":\"admin\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, false) AS osm_id, geometry, admin_level, disputed, maritime\\n  FROM (\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z0\\n    WHERE z(!scale_denominator!) = 0\\n    UNION ALL\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z1\\n    WHERE z(!scale_denominator!) = 1\\n    UNION ALL\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z2\\n    WHERE z(!scale_denominator!) = 2\\n    UNION ALL\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z3\\n    WHERE z(!scale_denominator!) = 3\\n    UNION ALL\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z4toz5\\n    WHERE z(!scale_denominator!) BETWEEN 4 AND 5\\n    UNION ALL\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z6\\n    WHERE z(!scale_denominator!) = 6\\n    UNION ALL\\n    SELECT osm_id, geometry, admin_level, disputed, maritime\\n    FROM admin_z7toz14\\n    WHERE z(!scale_denominator!) BETWEEN 7 AND 14\\n  ) AS admin\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"admin_level\":\"The OSM administrative level of the boundary\",\"disputed\":\"Number. Disputed boundaries are 1, all others are 0.\",\"maritime\":\"Number. Maritime boundaries are 1, all others are 0.\"},\"properties\":{\"buffer-size\":4,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"admin\"},{\"id\":\"country_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"wkb_geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, wkb_geometry,\\n  iso3166_1_alpha_2 AS code,\\n  name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh, \\n  rank AS scalerank\\n  FROM custom_countries\\n  WHERE (\\n    (\\n      rank <= 1\\n      AND z(!scale_denominator!) = 1 AND wkb_geometry && !bbox!\\n    )\\n    OR\\n    (\\n      rank <= 2\\n      AND z(!scale_denominator!) >= 2 AND wkb_geometry && !bbox!\\n    )\\n    OR\\n    (\\n      rank <= 4\\n      AND z(!scale_denominator!) >= 3 AND wkb_geometry && !bbox!\\n    )\\n    OR\\n    (\\n      rank <= 5\\n      AND z(!scale_denominator!) >= 4 AND wkb_geometry && !bbox!\\n    )\\n    OR\\n    (\\n      rank <= 6\\n      AND z(!scale_denominator!) >= 5 AND wkb_geometry && !bbox!\\n    )\\n    OR\\n    (\\n      rank >= 7\\n      AND z(!scale_denominator!) >= 6 AND wkb_geometry && !bbox!\\n    )\\n  )\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"code\":\"ISO 3166-1 Alpha-2 code\",\"name\":\"Local name of the country\",\"name_de\":\"German name of the country\",\"name_en\":\"English name of the country\",\"name_es\":\"Spanish name of the country\",\"name_fr\":\"French name of the country\",\"name_ru\":\"Russian name of the country\",\"name_zh\":\"Chinese name of the country\",\"scalerank\":\"Number, 1-6. Useful for styling text sizes.\"},\"properties\":{\"buffer-size\":256,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"country_label\"},{\"id\":\"marine_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, wkb_geometry,\\n  name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh, \\n  case when ST_GeometryType(wkb_geometry) = 'ST_LineString' then 'line'\\n       else 'point' end AS placement,\\n  rank AS labelrank\\n  FROM custom_seas\\n  WHERE wkb_geometry && !bbox! AND (\\n    (\\n      rank = 1 AND z(!scale_denominator!) >= 1\\n    )\\n    OR (\\n      rank = 2 AND z(!scale_denominator!) >= 2\\n    )\\n    OR (\\n      rank = 3 AND z(!scale_denominator!) >= 3\\n    )\\n    OR (\\n      rank = 4 AND z(!scale_denominator!) >= 4\\n    )\\n    OR (\\n      rank = 5 AND z(!scale_denominator!) >= 5\\n    )\\n    OR (\\n      rank = 6 AND z(!scale_denominator!) >= 6\\n    )\\n  )\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"labelrank\":\"Number, 1-6. Useful for styling text sizes.\",\"name\":\"Local name of the sea\",\"name_de\":\"German name of the sea\",\"name_en\":\"English name of the sea\",\"name_es\":\"Spanish name of the sea\",\"name_fr\":\"French name of the sea\",\"name_ru\":\"Russian name of the sea\",\"name_zh\":\"Chinese name of the sea\",\"placement\":\"One of: point, line\"},\"properties\":{\"buffer-size\":256,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"marine_label\"},{\"id\":\"state_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, wkb_geometry, abbr,\\n  area_sqkm AS area,\\n  name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh\\n  FROM custom_states\\n  WHERE wkb_geometry && !bbox! AND (\\n    (\\n      area_sqkm > 90000 AND z(!scale_denominator!) >= 4\\n    )\\n    OR (\\n      z(!scale_denominator!) >= 5\\n    )\\n  )\\n) AS states\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"abbr\":\"Abbreviated state name\",\"area\":\"The area of the state in kilometers\u00b2\",\"name\":\"Local name of the state\",\"name_de\":\"German name of the state\",\"name_en\":\"English name of the state\",\"name_es\":\"Spanish name of the state\",\"name_fr\":\"French name of the state\",\"name_ru\":\"Russian name of the state\",\"name_zh\":\"Chinese name of the state\"},\"properties\":{\"buffer-size\":256,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"state_label\"},{\"id\":\"place_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"( SELECT * FROM (\\n    SELECT osm_ids2mbid(osm_id, true) as osm_id, topoint(geometry) AS geometry,\\n    name,\\n    coalesce(NULLIF(name_en, ''), name) AS name_en,\\n    coalesce(NULLIF(name_es, ''), name) AS name_es,\\n    coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n    coalesce(NULLIF(name_de, ''), name) AS name_de,\\n    coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n    coalesce(NULLIF(name_zh, ''), name) AS name_zh,\\n    type,\\n    capital,\\n    NULL AS ldir,\\n    normalize_scalerank(scalerank) AS scalerank,\\n    row_number() OVER (PARTITION BY LabelGrid(geometry, 85 * !pixel_width!)\\n                 ORDER BY scalerank ASC NULLS LAST,\\n                          population DESC NULLS LAST\\n    ) AS localrank\\n    FROM (\\n        SELECT * FROM place_label_z3\\n        WHERE z(!scale_denominator!) = 3\\n        UNION ALL\\n        SELECT * FROM place_label_z4\\n        WHERE z(!scale_denominator!) = 4\\n        UNION ALL\\n        SELECT * FROM place_label_z5\\n        WHERE z(!scale_denominator!) = 5\\n        UNION ALL\\n        SELECT * FROM place_label_z6toz7\\n        WHERE z(!scale_denominator!) BETWEEN 6 AND 7\\n        UNION ALL\\n        SELECT * FROM place_label_z8\\n        WHERE z(!scale_denominator!) = 8\\n        UNION ALL\\n        SELECT * FROM place_label_z9\\n        WHERE z(!scale_denominator!) = 9\\n        UNION ALL\\n        SELECT * FROM place_label_z10\\n        WHERE z(!scale_denominator!) = 10\\n        UNION ALL\\n        SELECT * FROM place_label_z11toz12\\n        WHERE z(!scale_denominator!) BETWEEN 11 AND 12\\n        UNION ALL\\n        SELECT * FROM place_label_z13\\n        WHERE z(!scale_denominator!) = 13\\n        UNION ALL\\n        SELECT * FROM place_label_z14\\n        WHERE z(!scale_denominator!) = 14\\n      ) AS place_label\\n    WHERE geometry && !bbox!\\n    ORDER BY population DESC NULLS LAST\\n) AS t WHERE z(!scale_denominator!) >= 11\\n          OR (z(!scale_denominator!) = 10 AND localrank < 6)\\n          OR (z(!scale_denominator!) = 9 AND localrank < 8)\\n          OR (z(!scale_denominator!) = 8 AND localrank < 12)\\n          OR (z(!scale_denominator!) = 7 AND localrank < 12)\\n          OR (z(!scale_denominator!) = 6 AND localrank < 8)\\n          OR z(!scale_denominator!) <= 5\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"capital\":\"Admin level the city is a capital of, if any. One of: 2, 3, 4, 5, 6, null\",\"ldir\":\"A hint for label placement at low zoom levels. One of: N, E, S, W, NE, SE, SW, NW, null\",\"localrank\":\"Number. Priority relative to nearby places. Useful for limiting label density.\",\"name\":\"Local name of the place\",\"name_de\":\"German name of the place\",\"name_en\":\"English name of the place\",\"name_es\":\"Spanish name of the place\",\"name_fr\":\"French name of the place\",\"name_ru\":\"Russian name of the place\",\"name_zh\":\"Chinese name of the place\",\"scalerank\":\"Number, 0-9 or null. Useful for styling text & marker sizes.\",\"type\":\"One of: city, town, village, hamlet, suburb, neighbourhood, island, islet, archipelago, residential, aboriginal_lands\"},\"properties\":{\"buffer-size\":128,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"place_label\"},{\"id\":\"water_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, geometry AS geometry,\\n  name,\\n  area,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh\\n  FROM (\\n    SELECT * FROM water_label_z10\\n    WHERE z(!scale_denominator!) = 10\\n    UNION ALL\\n    SELECT * FROM water_label_z11\\n    WHERE z(!scale_denominator!) = 11\\n    UNION ALL\\n    SELECT * FROM water_label_z12\\n    WHERE z(!scale_denominator!) = 12\\n    UNION ALL\\n    SELECT * FROM water_label_z13\\n    WHERE z(!scale_denominator!) = 13\\n    UNION ALL\\n    SELECT * FROM water_label_z14\\n    WHERE z(!scale_denominator!) = 14\\n  ) AS water_label\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"area\":\"The area of the water polygon in Mercator meters\u00b2\",\"name\":\"Local name of the water body\",\"name_de\":\"German name of the water body\",\"name_en\":\"English name of the water body\",\"name_es\":\"Spanish name of the water body\",\"name_fr\":\"French name of the water body\",\"name_ru\":\"Russian name of the water body\",\"name_zh\":\"Chinese name of the water body\"},\"properties\":{\"buffer-size\":64,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"water_label\"},{\"id\":\"poi_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, topoint(geometry) AS geometry, ref, name,\\n      coalesce(NULLIF(name_en, ''), name) AS name_en,\\n      coalesce(NULLIF(name_es, ''), name) AS name_es,\\n      coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n      coalesce(NULLIF(name_de, ''), name) AS name_de,\\n      coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n      coalesce(NULLIF(name_zh, ''), name) AS name_zh,\\n      format_type(type) AS type,\\n      poi_label_scalerank(type, area) AS scalerank,\\n      coalesce(NULLIF(maki_label_class(type), ''), 'marker') AS maki,\\n      rank() OVER (PARTITION BY LabelGrid(geometry, 128 * !pixel_width!)\\n                   ORDER BY poi_label_localrank(type) ASC) AS localrank\\n    FROM poi_label_z14\\n    WHERE z(!scale_denominator!) = 14\\n      AND geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"localrank\":\"Number. Priority relative to nearby POIs. Useful for limiting label density.\",\"maki\":\"The name of the Maki icon that should be used for the POI\",\"name\":\"Local name of the POI\",\"name_de\":\"German name of the POI\",\"name_en\":\"English name of the POI\",\"name_es\":\"Spanish name of the POI\",\"name_fr\":\"French name of the POI\",\"name_ru\":\"Russian name of the POI\",\"name_zh\":\"Chinese name of the POI\",\"ref\":\"Short reference code, if any\",\"scalerank\":\"Number. 1-5. Useful for styling icon sizes and minimum zoom levels.\",\"type\":\"The original OSM tag value\"},\"properties\":{\"buffer-size\":64,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"poi_label\"},{\"id\":\"road_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT * FROM\\n  (\\n  SELECT osm_ids2mbid(osm_id, false) AS osm_id,\\n    CASE WHEN z(!scale_denominator!) < 11\\n         THEN st_startpoint(geometry)\\n         ELSE geometry\\n    END AS geometry,\\n    name,\\n    coalesce(NULLIF(name_en, ''), name) AS name_en,\\n    coalesce(NULLIF(name_es, ''), name) AS name_es,\\n    coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n    coalesce(NULLIF(name_de, ''), name) AS name_de,\\n    coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n    coalesce(NULLIF(name_zh, ''), name) AS name_zh,\\n    nullif(ref, '') AS ref,\\n    nullif(char_length(ref), 0) AS reflen,\\n    round(MercLength(geometry)) AS len,\\n    road_class(type, service, access) AS class,\\n    'default' AS shield,\\n    rank() OVER (\\n        PARTITION BY LabelGrid(geometry, (CASE WHEN z(!scale_denominator!) >= 11\\n                                               THEN 300\\n                                               ELSE 200 \\n                                           END) * !pixel_width!)\\n        ORDER BY road_localrank(type) ASC, round(MercLength(geometry)) DESC\\n    ) AS localrank\\n    FROM (\\n      SELECT * FROM road_label_z8toz10\\n      WHERE z(!scale_denominator!) BETWEEN 8 AND 10\\n      UNION ALL\\n      SELECT * FROM road_label_z11\\n      WHERE z(!scale_denominator!) = 11\\n      UNION ALL\\n      SELECT * FROM road_label_z12toz13\\n      WHERE z(!scale_denominator!) BETWEEN 12 AND 13\\n      UNION ALL\\n      SELECT * FROM road_label_z14\\n      WHERE z(!scale_denominator!) = 14\\n    ) AS road_label\\n    WHERE geometry && !bbox!\\n      AND ST_GeometryType(geometry) = 'ST_LineString'\\n  ) AS t1\\n  WHERE (z(!scale_denominator!) BETWEEN 8 AND 10 AND localrank < 2)\\n     OR (z(!scale_denominator!) BETWEEN 11 AND 12 AND localrank < 5)\\n     OR (z(!scale_denominator!) BETWEEN 13 AND 14)\\n) AS t2\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: motorway, motorway_link, 'trunk', 'primary', 'secondary', 'tertiary', 'link', 'street', 'street_limited', 'pedestrian', 'construction', 'track', 'service', 'ferry', 'path', 'golf'\",\"len\":\"Number. Approximate length of the road segment in Mercator meters.\",\"localrank\":\"Number. Used for shield points only. Priority relative to nearby shields. Useful for limiting shield density.\",\"name\":\"Local name of the road\",\"name_de\":\"German name of the road\",\"name_en\":\"English name of the road\",\"name_es\":\"Spanish name of the road\",\"name_fr\":\"French name of the road\",\"name_ru\":\"Russian name of the road\",\"name_zh\":\"Chinese name of the road\",\"ref\":\"Route number of the road\",\"reflen\":\"Number. How many characters long the ref tag is. Useful for shield styling.\",\"shield\":\"The shield style to use. One of: default, mx-federal, mx-state, us-highway, us-highway-alternate, us-highway-business, us-highway-duplex, us-interstate, us-interstate-business, us-interstate-duplex, us-interstate-truck, us-state\"},\"properties\":{\"buffer-size\":8,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"road_label\"},{\"id\":\"waterway_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, false) AS osm_id, geometry, name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh,\\n  type, type AS class\\n  FROM (\\n    SELECT * FROM waterway_label_z13\\n    WHERE z(!scale_denominator!) = 13\\n    UNION ALL\\n    SELECT * FROM waterway_label_z14\\n    WHERE z(!scale_denominator!) = 14\\n  ) AS waterway_label\\n  WHERE geometry && !bbox!\\n  AND linelabel(z(!scale_denominator!), name, geometry)\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"class\":\"One of: river, canal, stream, stream_intermittent\",\"name\":\"Local name of the waterway\",\"name_de\":\"German name of the waterway\",\"name_en\":\"English name of the waterway\",\"name_es\":\"Spanish name of the waterway\",\"name_fr\":\"French name of the waterway\",\"name_ru\":\"Russian name of the waterway\",\"name_zh\":\"Chinese name of the waterway\",\"type\":\"One of: river, canal, stream\"},\"properties\":{\"buffer-size\":8,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"waterway_label\"},{\"id\":\"airport_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, topoint(geometry) AS geometry,\\n  name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh,\\n  coalesce(NULLIF(iata, ''), NULLIF(ref, ''), NULLIF(icao, ''), faa) AS ref,\\n  airport_label_class(kind, type) AS maki,\\n  airport_label_scalerank(airport_label_class(kind, type), area, aerodrome) AS scalerank\\n  FROM airport_label_z9toz14\\n  WHERE geometry && !bbox!\\n  AND z(!scale_denominator!) BETWEEN 9 AND 14\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"maki\":\"One of: airport, airfield, heliport, rocket\",\"name\":\"Local name of the airport\",\"name_de\":\"German name of the airport\",\"name_en\":\"English name of the airport\",\"name_es\":\"Spanish name of the airport\",\"name_fr\":\"French name of the airport\",\"name_ru\":\"Russian name of the airport\",\"name_zh\":\"Chinese name of the airport\",\"ref\":\"A 3-4 character IATA, FAA, ICAO, or other reference code\",\"scalerank\":\"Number 1-4. Useful for styling icon sizes.\"},\"properties\":{\"buffer-size\":64,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"airport_label\"},{\"id\":\"rail_station_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"geometry\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, geometry,\\n  name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh,\\n  rail_station_class(type) AS maki,\\n  rail_station_class(type) AS network\\n  FROM (\\n    SELECT * FROM rail_station_label_z13\\n    WHERE z(!scale_denominator!) = 13\\n    UNION ALL\\n    SELECT * FROM rail_station_label_z14\\n    WHERE z(!scale_denominator!) = 14\\n  ) AS t\\n  WHERE geometry && !bbox!\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"maki\":\"One of: rail, rail-metro, rail-light, entrance\",\"name\":\"Local name of the rail station\",\"name_de\":\"German name of the rail station\",\"name_en\":\"English name of the rail station\",\"name_es\":\"Spanish name of the rail station\",\"name_fr\":\"French name of the rail station\",\"name_ru\":\"Russian name of the rail station\",\"name_zh\":\"Chinese name of the rail station\",\"network\":\"The network(s) that the station serves. Useful for icon styling.\"},\"properties\":{\"buffer-size\":64,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"rail_station_label\"},{\"id\":\"mountain_peak_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, geometry,\\n  meter_to_feet(elevation_m) AS elevation_ft,\\n  elevation_m,\\n  mountain_peak_type(type) AS maki,\\n  name,\\n  coalesce(NULLIF(name_en, ''), name) AS name_en,\\n  coalesce(NULLIF(name_es, ''), name) AS name_es,\\n  coalesce(NULLIF(name_fr, ''), name) AS name_fr,\\n  coalesce(NULLIF(name_de, ''), name) AS name_de,\\n  coalesce(NULLIF(name_ru, ''), name) AS name_ru,\\n  coalesce(NULLIF(name_zh, ''), name) AS name_zh\\n  FROM mountain_peak_label_z12toz14\\n  WHERE geometry && !bbox!\\n    AND z(!scale_denominator!) BETWEEN 12 AND 14\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"elevation_ft\":\"Integer elevation in feet\",\"elevation_m\":\"Integer elevation in meters\",\"maki\":\"One of: 'mountain', 'volcano'\",\"name\":\"Local name of the mountain peak\",\"name_de\":\"German name of the mountain peak\",\"name_en\":\"English name of the mountain peak\",\"name_es\":\"Spanish name of the mountain peak\",\"name_fr\":\"French name of the mountain peak\",\"name_ru\":\"Russian name of the mountain peak\",\"name_zh\":\"Chinese name of the mountain peak\"},\"properties\":{\"buffer-size\":64,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"mountain_peak_label\"},{\"id\":\"housenum_label\",\"Datasource\":{\"dbname\":\"osm\",\"extent\":\"-20037508.34,-20037508.34,20037508.34,20037508.34\",\"geometry_field\":\"\",\"geometry_table\":\"\",\"host\":\"172.17.0.4\",\"key_field\":\"osm_id\",\"key_field_as_attribute\":false,\"max_size\":512,\"password\":\"osm\",\"port\":\"5432\",\"srid\":\"\",\"table\":\"(\\n  SELECT osm_ids2mbid(osm_id, true) AS osm_id, topoint(geometry) AS geometry, house_num\\n  FROM housenum_label_z14\\n  WHERE geometry && !bbox!\\n    AND z(!scale_denominator!) = 14\\n) AS data\",\"type\":\"postgis\",\"user\":\"osm\"},\"description\":\"\",\"fields\":{\"house_num\":\"House number\"},\"properties\":{\"buffer-size\":64,\"minzoom\":0,\"maxzoom\":22},\"srs\":\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over\",\"name\":\"housenum_label\"}],\"vector_layers\":[{\"id\":\"landuse\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"class\":\"One of: agriculture, cemetery, glacier, grass, hospital, industrial, park, parking, piste, pitch, rock, sand, school, scrub, wood, aboriginal lands\",\"type\":\"OSM tag, more specific than class\"}},{\"id\":\"waterway\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"type\":\"One of: river, canal, stream, ditch, drain\",\"class\":\"One of: river, canal, stream, stream_intermittent, ditch, drain\"}},{\"id\":\"water\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{}},{\"id\":\"aeroway\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"type\":\"One of: runway, taxiway, apron\"}},{\"id\":\"barrier_line\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"class\":\"One of: fence, hedge, cliff, gate\"}},{\"id\":\"building\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"underground\":\"Text. Whether building is underground. One of: 'true', 'false'\"}},{\"id\":\"landuse_overlay\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"class\":\"One of: national_park, wetland, wetland_noveg\",\"type\":\"OSM tag, more specific than class\"}},{\"id\":\"road\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"type\":\"In most cases, values will be that of the primary key from OpenStreetMap tags.\",\"class\":\"One of: 'motorway', 'motorway_link', 'trunk', 'primary', 'secondary', 'tertiary', 'link', 'street', 'street_limited', 'pedestrian', 'construction', 'track', 'service', 'ferry', 'path', 'golf'\",\"oneway\":\"Text. Whether traffic on the road is one-way. One of: 'true', 'false'\",\"structure\":\"Text. One of: 'none', 'bridge', 'tunnel', 'ford'. Available from zoom level 13+.\"}},{\"id\":\"admin\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"admin_level\":\"The OSM administrative level of the boundary\",\"disputed\":\"Number. Disputed boundaries are 1, all others are 0.\",\"maritime\":\"Number. Maritime boundaries are 1, all others are 0.\"}},{\"id\":\"country_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"code\":\"ISO 3166-1 Alpha-2 code\",\"name\":\"Local name of the country\",\"name_en\":\"English name of the country\",\"name_es\":\"Spanish name of the country\",\"name_fr\":\"French name of the country\",\"name_de\":\"German name of the country\",\"name_ru\":\"Russian name of the country\",\"name_zh\":\"Chinese name of the country\",\"scalerank\":\"Number, 1-6. Useful for styling text sizes.\"}},{\"id\":\"marine_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the sea\",\"name_en\":\"English name of the sea\",\"name_es\":\"Spanish name of the sea\",\"name_fr\":\"French name of the sea\",\"name_de\":\"German name of the sea\",\"name_ru\":\"Russian name of the sea\",\"name_zh\":\"Chinese name of the sea\",\"placement\":\"One of: point, line\",\"labelrank\":\"Number, 1-6. Useful for styling text sizes.\"}},{\"id\":\"state_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"abbr\":\"Abbreviated state name\",\"area\":\"The area of the state in kilometers\u00b2\",\"name\":\"Local name of the state\",\"name_en\":\"English name of the state\",\"name_es\":\"Spanish name of the state\",\"name_fr\":\"French name of the state\",\"name_de\":\"German name of the state\",\"name_ru\":\"Russian name of the state\",\"name_zh\":\"Chinese name of the state\"}},{\"id\":\"place_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the place\",\"name_en\":\"English name of the place\",\"name_es\":\"Spanish name of the place\",\"name_fr\":\"French name of the place\",\"name_de\":\"German name of the place\",\"name_ru\":\"Russian name of the place\",\"name_zh\":\"Chinese name of the place\",\"type\":\"One of: city, town, village, hamlet, suburb, neighbourhood, island, islet, archipelago, residential, aboriginal_lands\",\"capital\":\"Admin level the city is a capital of, if any. One of: 2, 3, 4, 5, 6, null\",\"ldir\":\"A hint for label placement at low zoom levels. One of: N, E, S, W, NE, SE, SW, NW, null\",\"scalerank\":\"Number, 0-9 or null. Useful for styling text & marker sizes.\",\"localrank\":\"Number. Priority relative to nearby places. Useful for limiting label density.\"}},{\"id\":\"water_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the water body\",\"area\":\"The area of the water polygon in Mercator meters\u00b2\",\"name_en\":\"English name of the water body\",\"name_es\":\"Spanish name of the water body\",\"name_fr\":\"French name of the water body\",\"name_de\":\"German name of the water body\",\"name_ru\":\"Russian name of the water body\",\"name_zh\":\"Chinese name of the water body\"}},{\"id\":\"poi_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"ref\":\"Short reference code, if any\",\"name\":\"Local name of the POI\",\"name_en\":\"English name of the POI\",\"name_es\":\"Spanish name of the POI\",\"name_fr\":\"French name of the POI\",\"name_de\":\"German name of the POI\",\"name_ru\":\"Russian name of the POI\",\"name_zh\":\"Chinese name of the POI\",\"type\":\"The original OSM tag value\",\"scalerank\":\"Number. 1-5. Useful for styling icon sizes and minimum zoom levels.\",\"maki\":\"The name of the Maki icon that should be used for the POI\",\"localrank\":\"Number. Priority relative to nearby POIs. Useful for limiting label density.\"}},{\"id\":\"road_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the road\",\"name_en\":\"English name of the road\",\"name_es\":\"Spanish name of the road\",\"name_fr\":\"French name of the road\",\"name_de\":\"German name of the road\",\"name_ru\":\"Russian name of the road\",\"name_zh\":\"Chinese name of the road\",\"ref\":\"Route number of the road\",\"reflen\":\"Number. How many characters long the ref tag is. Useful for shield styling.\",\"len\":\"Number. Approximate length of the road segment in Mercator meters.\",\"class\":\"One of: motorway, motorway_link, 'trunk', 'primary', 'secondary', 'tertiary', 'link', 'street', 'street_limited', 'pedestrian', 'construction', 'track', 'service', 'ferry', 'path', 'golf'\",\"shield\":\"The shield style to use. One of: default, mx-federal, mx-state, us-highway, us-highway-alternate, us-highway-business, us-highway-duplex, us-interstate, us-interstate-business, us-interstate-duplex, us-interstate-truck, us-state\",\"localrank\":\"Number. Used for shield points only. Priority relative to nearby shields. Useful for limiting shield density.\"}},{\"id\":\"waterway_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the waterway\",\"name_en\":\"English name of the waterway\",\"name_es\":\"Spanish name of the waterway\",\"name_fr\":\"French name of the waterway\",\"name_de\":\"German name of the waterway\",\"name_ru\":\"Russian name of the waterway\",\"name_zh\":\"Chinese name of the waterway\",\"type\":\"One of: river, canal, stream\",\"class\":\"One of: river, canal, stream, stream_intermittent\"}},{\"id\":\"airport_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the airport\",\"name_en\":\"English name of the airport\",\"name_es\":\"Spanish name of the airport\",\"name_fr\":\"French name of the airport\",\"name_de\":\"German name of the airport\",\"name_ru\":\"Russian name of the airport\",\"name_zh\":\"Chinese name of the airport\",\"ref\":\"A 3-4 character IATA, FAA, ICAO, or other reference code\",\"maki\":\"One of: airport, airfield, heliport, rocket\",\"scalerank\":\"Number 1-4. Useful for styling icon sizes.\"}},{\"id\":\"rail_station_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"name\":\"Local name of the rail station\",\"name_en\":\"English name of the rail station\",\"name_es\":\"Spanish name of the rail station\",\"name_fr\":\"French name of the rail station\",\"name_de\":\"German name of the rail station\",\"name_ru\":\"Russian name of the rail station\",\"name_zh\":\"Chinese name of the rail station\",\"maki\":\"One of: rail, rail-metro, rail-light, entrance\",\"network\":\"The network(s) that the station serves. Useful for icon styling.\"}},{\"id\":\"mountain_peak_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"elevation_ft\":\"Integer elevation in feet\",\"elevation_m\":\"Integer elevation in meters\",\"maki\":\"One of: 'mountain', 'volcano'\",\"name\":\"Local name of the mountain peak\",\"name_en\":\"English name of the mountain peak\",\"name_es\":\"Spanish name of the mountain peak\",\"name_fr\":\"French name of the mountain peak\",\"name_de\":\"German name of the mountain peak\",\"name_ru\":\"Russian name of the mountain peak\",\"name_zh\":\"Chinese name of the mountain peak\"}},{\"id\":\"housenum_label\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":22,\"fields\":{\"house_num\":\"House number\"}}]}", 
    "maskLevel": "8", 
    "bounds": "-141.1027499,41.5765556,-52.223198,83.4362128", 
    "version": "2.0", 
    "mtime": "1463000297761", 
    "maxzoom": "14", 
    "scheme": "tms", 
    "type": "baselayer", 
    "id": "osm2vectortiles", 
    "center": "-96.66297395,62.5063842,10"
}

Target directory should not exist...

Thanks for switching away from Boost, the Python version is so much easier to get running.

For converting MBTiles into tiles, the Target directory can't exist or else the test on line 204 fails silently. It would be nice if it spit out a message or there was a note in the readme.

Thanks again!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.