openstreetmap / mapnik-stylesheets Goto Github PK
View Code? Open in Web Editor NEWMirror of the mapnik stylesheets formerly used on OpenStreetMap.org
Home Page: http://svn.openstreetmap.org/applications/rendering/mapnik/
Mirror of the mapnik stylesheets formerly used on OpenStreetMap.org
Home Page: http://svn.openstreetmap.org/applications/rendering/mapnik/
$ ./generate_xml.py --dbname osm --user postgres --password password --accept-none
{'dbname': 'osm', 'host': '', 'user': 'postgres', 'extent': '-20037508,-19929239,20037508,19929239', 'password': 'password', 'port': '', 'estimate_extent': 'false'}
Traceback (most recent call last):
File "./generate_xml.py", line 174, in
validate(blended,parser)
File "./generate_xml.py", line 90, in validate
if not os.path.exists(params['world_boundaries']):
KeyError: 'world_boundaries'
osm@NL-Map:~/mapnik-style$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import os
os.path.exists('world_boundaries')
True
I think that the "blended" array (at line 173) isn't picking up the 'world_boundaries' properly.
Am I not meant to use this xml file?
RuntimeError: Unable to process some data while parsing '/home/arch/openstreetmap-carto/osm.xml':
* attribute 'maximum-scale-denominator' with value '25000000' at line 0
* attribute 'minimum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '25000000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '3000000' at line 0
* attribute 'minimum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '1000000000' at line 0
* attribute 'minimum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '25000000' at line 0
* attribute 'maximum-scale-denominator' with value '25000000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '5000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '3000000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '12500' at line 0
* attribute 'maximum-scale-denominator' with value '3000000' at line 0
* attribute 'maximum-scale-denominator' with value '25000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '25000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '12500000' at line 0
* attribute 'minimum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '2500' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '500000000' at line 0
* attribute 'minimum-scale-denominator' with value '50000000' at line 0
* attribute 'maximum-scale-denominator' with value '50000000' at line 0
* attribute 'minimum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'minimum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '12500' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '3000000' at line 0
* attribute 'maximum-scale-denominator' with value '12500' at line 0
* attribute 'maximum-scale-denominator' with value '200000000' at line 0
* attribute 'maximum-scale-denominator' with value '100000000' at line 0
* attribute 'minimum-scale-denominator' with value '12500' at line 0
* attribute 'maximum-scale-denominator' with value '50000000' at line 0
* attribute 'maximum-scale-denominator' with value '50000000' at line 0
* attribute 'minimum-scale-denominator' with value '12500' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '200000' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '12500' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'minimum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '25000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '25000' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '25000' at line 0
* attribute 'maximum-scale-denominator' with value '1000000000' at line 0
* attribute 'minimum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '750000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '5000' at line 0
* attribute 'maximum-scale-denominator' with value '5000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '400000' at line 0
* attribute 'maximum-scale-denominator' with value '100000' at line 0
* attribute 'maximum-scale-denominator' with value '50000' at line 0
* attribute 'maximum-scale-denominator' with value '5000' at line 0
Hi, I am using the generate_image.py
script as I would like to generate some image files for printing.
I should emphasize that I barely know what I am doing: I don't work with GIS and I am winging it.
The problem I encountered is that, upon calling render
, some PostGIS function is called that does not exist:
Traceback (most recent call last):
File "/generate_image.py", line 70, in <module>
mapnik.render(m, im)
RuntimeError: Postgis Plugin: ERROR: function st_estimated_extent(unknown, unknown) does not exist
LINE 1: ..._YMin(ext),ST_XMax(ext),ST_YMax(ext) FROM (SELECT ST_Estimat...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
in executeQuery Full sql was: 'SELECT ST_XMin(ext),ST_YMin(ext),ST_XMax(ext),ST_YMax(ext) FROM (SELECT ST_Estimated_Extent('planet_osm_polygon','way') as ext) as tmp'
This query, which returns the user functions
select n.nspname as function_schema,
p.proname as function_name,
l.lanname as function_language,
pg_get_function_arguments(p.oid) as function_arguments,
t.typname as return_type
from pg_proc p
left join pg_namespace n on p.pronamespace = n.oid
left join pg_language l on p.prolang = l.oid
left join pg_type t on t.oid = p.prorettype
where n.nspname not in ('pg_catalog', 'information_schema') and p.proname like '%estimate%extent%'
order by function_schema,
function_name;
returns
function_schema | function_name | function_language | function_arguments | return_type
-----------------+--------------------+-------------------+---------------------------+-------------
public | st_estimatedextent | c | text, text, text, boolean | box2d
public | st_estimatedextent | c | text, text, text | box2d
public | st_estimatedextent | c | text, text | box2d
(3 rows)
It seems that the function was renamed at some point in the past.
I was able to find a closed issue in the Mapnik repo but I am not sure how to take it from there.
Any help would be appreciated!
FYI, I am running on Windows 10, PostgreSQL 13 and PostGIS 3.1.0.
Is this repository capable of being synced up to the SVN repo? Are there any plans (please, god, I hope) to use 'just git' for this and not have to deal with SVN for this project?
Hi!
Is it possible to change rendering of "proposed" features? IMHO: currrent version of "proposed" features is quite heavy. Sometimes it can take years (or decades) to build proposed railways or highways.
I suggest that proposed highways will be only dashlines as outerlines (no fill at all).
P
I think it would be beneficial if vending machines (especially e.g. for food or drinks) are also displayed in Mapnik.
Partly the vending machines replace small grocery stores, and since even dog excrement machines are displayed, I am strongly in favor of also displaying other vending machines, which - according to my impression in my area - are increasing strongly lately.
The README file of the project didn't have a md extension, so github didn't show it good.
I see the osm.xml render subway station text & image use PointsSymbolizer ,TextSymbolizer ,why not just use ShieldSymbolizer ?
Golf fairways should be rendered differently from the golf green, but they are not, leading to handful of examples I have found of people tagging for the renderer.
It could useful if you can insert the extent as min-longitude, min‐latitude, max-longitude, max-latitude, as for osm2pgsql.
Is this project current at all in the light of openstreetmap-carto deployed on osm.org?
I have cloned mapnik-stylesheets
project.
I have installed python-mapnik
.
I have this error when running ./generate_image.py
:
RuntimeError: failed to initialize projection with: '&srs900913;' in Map of 'osm.xml'
I have a problem while generating tiles with generate_tiles.py. It writes randomly "empty tiles" on the log during the process (zoom level 15). It seems that it is totally random and not connected to a geographic area (I loaded a full country pbf to postgis, and now generate tile to a subset). I use a slow hard disk, and run the Ubuntu on VM with more than 6 GB RAM, but it use only 2 CPU core (an old AMD Athlon X3). I checked these tiles and they are really empty.
Screenshot:
click here
i missed the railway-special-element "hump_yard" to split trains and create new train-combinations.
style: same like a normal railway or a service-rail.
Translate by google:
"A hill in a yard, over which runs a track. Freight cars are pushed over that hill, so they roll under its own power in the right track. If it is detected as a point on the track."
I installed a tile server based on this tutorial: https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/
I strictly followed the instructions and I use Ubuntu 16.04.1 clean install.
The server works, but there is an error when I want to run generate_tiles.py.
"Runtime Error: Failed to find font face 'Noto Sans Adlam Regular' in FontSet 'fontset-0' in FontSet at line 17 of '/home/user/src/openstreetmap-carto/style.xml
I have added a wayside shrine to OSM just a while ago (http://www.openstreetmap.org/node/4460585378), it does not render. Its importance is nearly the same as wayside_cross, it could have the same rules (from which zoom to render, etc.)
Currently if you tag a dam with waterway=dam on a closed way (the area that the dam occupies) no rendering at all is provided on Mapnik.
This is not consistent with the Wiki page [1] that suggest to tag dam on areas.
Can anyone repair this issue?
[1] http://wiki.openstreetmap.org/wiki/Tag:waterway%3Ddam
Thank you
Alberto
I have read many places that mapnik will generate tiles faster if the tile cover a larger map area.
So instead of producing png tiles that are 256x256 pixlels (BASETILE), mapnik can (I believe) produce meta tiles (png) which consist of e.g. 4 (BASETILE's) so the resulting meta tile is 512 x 512 pixels. I have also read many places that instead of generating 2x2 meta tiles, one can produce e.g. 4 x 4 or 8 x 8 meta tiles - which will speed up the generation of the tiles even more.
Would appreciate if someone could explain how this can be done - when using generate_tiles.py, and eventually a modified version of mapnik (if needed). After the generation of the meta tiles, it would be needed to split the meta tiles into "normal" tile size of 256 x 256 png files - with the correct directory structure and file names.
I've just come over to castle ruins that were not in the map. I wanted to tag them but to my surprise they already are in the map, just not rendered in Mapnik.
The area: http://www.openstreetmap.org/#map=18/49.28095/16.07840
The ruins are tagged on a node with these tags:
historic=ruins
name=zřícenina hradu Dub
ruins=castle
source=gps
According to the Wiki page that should be okay. The "ruins=castle" is added by me just a while ago but it did not help anyway.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.