Coder Social home page Coder Social logo

openstreetmap / mapnik-stylesheets Goto Github PK

View Code? Open in Web Editor NEW
154.0 154.0 95.0 1.64 MB

Mirror of the mapnik stylesheets formerly used on OpenStreetMap.org

Home Page: http://svn.openstreetmap.org/applications/rendering/mapnik/

C 25.43% Python 49.32% Perl 16.96% Ruby 4.17% Racket 2.13% Shell 1.98%

mapnik-stylesheets's People

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

mapnik-stylesheets's Issues

blended array: world_boundaries

$ ./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.

generate_tiles grumpy about maximum-scale-denominator?

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

`ST_Estimated_Extent` renamed to `ST_EstimatedExtent`

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.

Can changes be contributed here?

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?

Proposed features

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

vending_machine=food not rendered

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.

extent-deg switch?

It could useful if you can insert the extent as min-longitude, min‐latitude, max-longitude, max-latitude, as for osm2pgsql.

RuntimeError: failed to initialize projection

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'

Empty Tiles during generating tiles

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

special railway-element

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."

How do I make mapnik to produce meta tiles e.g. 2x2, 4x4 or 8x8 (using generate_tiles.py)

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.

historic = ruins on a node not rendered

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.

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.