GithubHelp home page GithubHelp logo

citizenfish / os_vector_tiles Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 5.0 23.71 MB

Development of a Mapbox GL style for OS Vector Tiles

License: GNU General Public License v3.0

JavaScript 88.68% HTML 5.84% Perl 2.98% Shell 1.12% CSS 1.38%

os_vector_tiles's Introduction

Creating Vector Tiles from Ordnance Survey Opendata

This repository contains the presentation materials, samples and code for talk given by Dave Barter at the FOSS4G 2018 Open Source conference.

All of the content within is curated by Nautoguide Ltd. who are really nice and you should talk to them about developing some lovely map web sites.

It's all licensed under the GPL APART from the content of the fonts directory which are derived from https://github.com/mapbox/fontnik and licensed under the OFL or Apache licenses.

Creating Tiles

create_tiles contains the make_vector_tiles.pl script which provides a wrapper around the workflow necessary to create MVT format vector tiles from multiple shape files. This requires a config file config.json

The config must include a config section:

 "config": {
    "output_file": "/opt/nautoguide/gisraw/vector_tiles/os_all.mbtiles",
    "tmp_dir": "/tmp/os_opendata/",
    "minzoom": 0,
    "maxzoom": 16,
    "detail_level": 8
  }

minzoom and maxzoom set the zoom level range for the tiles

detail_level sets the detail level (-d) parameter of tippecanoe, more detail at this link

Individual layers are formatted as follows:-

"openmap_railwaystation": [
      {
        "name": "Openmap Railway Station",
        "file": "/opt/nautoguide/gisraw/os-opendata-2016/openmap_vector/data/RailwayStation.shp",
        "maxzoom": 16,
        "minzoom": 13,
        "attrs": [
          "distname,classifica,featcode"
        ],
        "add": {
          "name": "Openmap Railway Station"
        }
      }
    ]

file must point to an ESRI shapefile in EPSG:27700

The maxzoom and minzoom attributes are used to restrict the zoom levels for this layer

The attrs array selects the attributes from the shapefile to be copied into the layer attributes

The add structure allows you to add fixed data to the layer attributes

OS Opendata Mapbox Style

This is very much work in progress but the latest style can be found in the mapbox-samples directory in the file os_opendata_style.js

os_vector_tiles's People

Contributors

citizenfish avatar el-dunco avatar richardjr avatar

Stargazers

GeoLibra avatar Matt Walker avatar

Watchers

James Cloos avatar  avatar  avatar

os_vector_tiles's Issues

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.