Git Product home page Git Product logo

osm-bright.tm2source's Introduction

Kartotherian

Kartotherian is a map tile service originally built for the Wikimedia projects. Its primary components include:

  • Kartotherian (readme): a map tile server tying together various open source modules from the TileLive ecosystem, thereby providing for serving tiles from a variety of sources.
  • Tilerator (readme): a job scheduler used to schedule asynchronous map tile generation jobs, offering both a command-line and a GUI interface.

This is a monorepo containing (in the packages/ subdirectory) the various modules developed as part of the Kartotherian project and used in Kartotherian and Tilerator. The repo is managed using Lerna. To install the dependencies for all modules, npm install -g lerna and run the following from the project root:

lerna bootstrap --hoist --nohoist mapnik --nohoist libxmljs

The Kartotherian and Tilerator services can then be started accoring to the instructions provided in their individual READMEs.

IMPORTANT: Installing and running the Kartotherian services requires node.js 6 or 8. Node.js 10+ is not yet supported.

osm-bright.tm2source's People

Contributors

az09 avatar catrope avatar johngian avatar maxsem avatar nyurik avatar phyks avatar pikse avatar pnorman avatar stephanebisson avatar thesocialdev 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osm-bright.tm2source's Issues

admin.sql - 3rd function theRow.tags

Hi,

we use the Postgres.app for OS X with PostGIS, PROJ4 and GDAL.

These are our steps to create the source project:

  • create database
  • create postgis extension
  • import: psql -f postgis-vt-util.sql
  • import OSM data via osm2pgsql
  • import: psql -f admin.sql (execute with error)
  • import: psql -f functions.sql
  • shp2pgsql -g way water-polygons-split-3857/water_polygons.shp | psql -h localhost -p 5432 -U username -d databasename
  • cat "$( dirname "${BASH_SOURCE[0]}" )"/../sql/water-indexes.sql | psql -h localhost -p 5432 -U username -d databasename

i get an error when i try to execute admin.sql. The 3rd function insert_admin_rows
produce an error.

ERROR: "therow.tags" is not a known variable
LINE 93: theRow.tags := theRow.tags || (CASE WHEN maritime THEN '"ma...

Do you have any advice for us?

Function:

-- Inserts 1 row per sub-geometry into the admin table

-- @param row admin: Row to insert
-- @param LineString|MultiLineString geom: Geometry to set for this row

-- @param bool maritime: Whether the border is maritime

CREATE OR REPLACE FUNCTION insert_admin_rows(theRow admin, geom geometry, maritime bool) RETURNS void AS
$$
DECLARE
i int;

BEGIN
theRow.tags := theRow.tags || (CASE WHEN maritime THEN '"maritime" => "1"' ELSE '"maritime" => "0"' END)::hstore;
IF GeometryType(geom) = 'LINESTRING' THEN -- Simple geometry
PERFORM insert_admin_row(theRow, geom);
ELSE
FOR i IN 1..ST_NumGeometries(geom) LOOP -- Composite geometry, insert one row per subgeometry
PERFORM insert_admin_row(theRow, ST_GeometryN(geom, i));
END LOOP;
END IF;
END
$$
LANGUAGE plpgsql;

theRow is not a known variable

The line
theRow.tags := theRow.tags || (CASE WHEN maritime THEN '"maritime" => "1"' ELSE '"maritime" => "0"' END)::hstore;

trows the error

ERROR:  "therow.tags" is not a known variable
LINE 7:  theRow.tags := theRow.tags || (CASE WHEN maritime THEN '"ma...

when I run

psql gis < admin.sql

"Couldn't read EPSG definition" error on Ubuntu 16.04 / macOS

The command in the readme.md's example:
osm2pgsql -d gis -E 900913 --hstore ~/path/to/data.osm.pbf

generates this error on both Ubuntu and macOS:
Couldn't read EPSG definition (do you have /usr/share/proj/epsg?)

Changing the command to this, fixed it:
osm2pgsql -d gis -E EPSG:900913 --hstore ~/path/to/data.osm.pbf

When opening the data source on MapBox Studio Classic an exception is thrown because of LabelGrid sql functio

Hi,

I created a new postgis db and converted an osm.pbf dataset as outlined in
https://github.com/kartotherian/kartotherian/blob/master/README.md#in-depth-step-by-step

When I tried to open the .tm2source in MapBox Studio Classic I got an error about 'LabelGrid' arguments. The error was:
Postgis Plugin: ERROR: function labelgrid(geometry, integer, integer) does not exist
LINE 51: ORDER BY labelgrid(way, 64, 0), sort_order DESC
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
in executeQuery Full sql was: 'SELECT * FROM (

When looking at it closely, the function as defined in the .sql expects two arguments but in the .yml its called with three arguments

[https://github.com/mapbox/postgis-vt-util/blob/master/postgis-vt-util.sql#L122-124]

2 arguments are expected.

In
[https://github.com/kartotherian/osm-bright.tm2source/blob/master/data.yml#L471]

3 arguments are passed.

Are the two files (.sql and .yml) out of sync because I'm not using the right util .sql version ?

Thanks

noury

Airport names not visible

Hello,

Appears that none of the airports' names are shown, even though runways and buildings are shown. I suspect this has to do with the source file as the style file handles airport labels exactly the same way Mapbox's version does (which works fine). The landuse polygons for airports are also not being rendered though they exist in the PBF (and in mapbox sources).

This issue exists even in the online version of Kartotherian.

Is this a known issue? I saw that this was fixed in the brightmed style but any plans of porting the fix to this source? If not I'll be happy to send a PR if you can provide clues as to how to fix this.

"Geometries with different SRIDs" errors

In Ubuntu 16.04 with Postgres 9.5, I get a geometries with different SRIDs error while running

psql -d gis -c 'select populate_admin();'

Changing line 32 of sql/admin.sql from:
result := ST_Intersection(way, water);

To:
result := ST_Intersection(ST_Transform(way, 3857), ST_Transform(water,3857));

Appears to have fixed. If this is correct, I'll send a PR.

water (image?) is not getting rendered

I've built the tile server described here: https://porter.io/github.com/kartotherian/kartotherian and everything went very well except for one issue. The rivers are not rendered normally, the only thing that gets shown is a very thin blue line (middle line of the river) (lakes won't get shown at all).
Did I miss to configure an image path ? Train stations and harbours render well... (there are some images present)

Thanks for the great work !

Upload to MapBox

Hi,

we're not able to upload the map source data to our MapBox account. The upload process had started
but the progress bar stucked at 0.1%. Zoom level is 16. We use the free plan of MapBox service.
Approximately 30 tiles/sec are rendered during upload or export process. Is that value ok?

upload_progressbar

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.