npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kartotherian/osm-bright-source

v1.0.8-wmf.0

Published

Data source for Wikimedia fork of the OSM Bright skin

Downloads

53

Readme

osm-bright.tm2source

Data source for Kartotherian's fork of OSM Bright

Install

This style requires an imposm3 database with ocean data, custom indexes, and custom functions.

It's probably easiest to grab an PBF of OSM data from geofabrik. Once you've installed PostgreSQL and PostGIS, create a database and import with imposm3:

createdb gis
psql -d gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;'
imposm import \
    -config ~/path/to/imposm/config.json \
    -mapping ./imposm_mapping.yml \
    -overwritecache \
    -read ~/path/to/data.osm.pbf \
    -diff \
    -write
imposm import \
    -config ~/path/to/imposm/config.json \
    -deployproduction 

Next we need some shapefiles for water_polygons and water_polygons_simplfied

curl -O http://data.openstreetmapdata.com/water-polygons-split-3857.zip
unzip water-polygons-split-3857.zip && rm water-polygons-split-3857.zip
cd water-polygons-split-3857
shp2pgsql -I -s 3857 -g way water_polygons.shp water_polygons | psql -Xqd gis
curl -O http://data.openstreetmapdata.com/simplified-water-polygons-split-3857.zip
unzip simplified-water-polygons-split-3857.zip && rm simplified-water-polygons-split-3857.zip
cd simplified-water-polygons-split-3857
shp2pgsql -I -s 3857 -g way simplified_water_polygons.shp water_polygons_simplified | psql -Xqd gis

Then the custom functions, indexes, and the layers functions

cd .. # return to osm-bright.tm2source directory
npm install
psql -Xqd gis -f node_modules/@kartotherian/postgis-vt-util/lib.sql
psql -Xqd gis -f sql/helpers/functions.sql
psql -Xqd gis -f sql/helpers/create-indexes.sql
psql -Xqd gis -f sql/helpers/names.sql
for sql_file in ./sql/layers/*.sql; do 
    echo $sql_file;
    psql -Xqd gis -f $sql_file;
done

Editing

  • Clone osm-bright.tm2source repository (this one)
  • Install the latest Mapbox Studio Classic Open Mapbox Studio and open the data source. You should see your data as "x-ray" outlines. Don't edit just data.yml or data.xml - they must be in sync; editing this project in MBS only ensures that.

To see the data in style

  • Clone osm-bright.tm2 repository
  • Edit style's project.yml - change the source: to "tmsource:///home/user/.../osm-bright.tm2source" directory. Open it in the Mapbox Studio.

Layers

The order of layers in this style matters because that's the default order that they will be drawn on map. Note that the list of layers goes from bottom to top, opposite to the order in files.

  • landuse - various uses for land: wood, park, industrial zone, etc. Mostly corresponds to OSM's landuse key.
  • waterway - streams, rivers on low zoom, etc.
  • water - water bodies (oceans, lakes, rivers wide enough on a given zoom level to be represented by areas as opposed to lines).
  • aeroway - both areas and lines related to airports: tarmacs, taxiing lines, etc.
  • building - buildings.
  • road - roads and other similar transport ways: streets, bridges and tunnels.
  • admin - administrative borders between countries and regions.
  • country_label - country labels.
  • place_label - city/neighborhood/district labels.
  • poi_label - places of interest. Currently, only transport stations are implemented.
  • road_label - road labels, including highway number shields.