Questions tagged [mapnik]

Mapnik is an open source mapping toolkit, written in C++ and can be scripted using binding languages such as JavaScript (Node.js), Python, Ruby, and Java. Useful for both Desktop- and Server-based map rendering. It is used by Tilemill, OpenStreetMap, Mapbox, CartoDB, Stamen, MapQuest and Kosmtik.

Filter by
Sorted by
Tagged with
2 votes
1 answer
68 views

Modifying openstreetmap-carto style to preference English labels

I have a working local OSM tile renderer (courtesy the kind people at switch2osm for the instructions). I'd like it to render labels in English where available, falling back to the local name if there ...
user avatar
  • 12.5k
1 vote
1 answer
32 views

OSM to SpatiaLite (spatialite_osm_map or ogr2ogr) for mapnik

I am trying to convert OSM data of a region (136MB pbf) to SQLite. I have two options: spatialite_osm_map or ogr2ogr. My region's SpatiaLite file is 932MB with ogr2ogr, while it is 741MB with ...
user avatar
  • 187
0 votes
1 answer
24 views

Python mapnik get TextSymbolizer bounding boxes

Is there a way to obtain the bounding boxes of each TextSymbolizer present on the map? For now, I'm using mapnik 3 and I create a map using a custom XML containing TextSymbolizer. I want to have ...
user avatar
  • 374
0 votes
1 answer
69 views

Creating an image at coordinates with given radius

It seems, like a trivial task, but I struggle to understand where I am doing wrong. I have a postgres db with maps, from which I create a mapnik::Map with whole map. Then, when I get query with ...
user avatar
  • 41
1 vote
0 answers
34 views

Mapnik usage in client server app

I am trying to use mapnik in my project, but I think I might be using it inefficiently or just wrong. Project is mapserver, one of requests from client is: get PNG of map providing current coordinates ...
user avatar
  • 41
0 votes
0 answers
63 views

How to convert style.json to Mapnik XML

I need to convert a style with JSON format to Stylesheet XML (in Mapnik). is it a way that I can do that? I want to create a custom style map and render it from the OSM (OpenStreetMap) server using ...
user avatar
3 votes
1 answer
197 views

How to create mapnik XML file for database

I have a folder of sea maps in S57 format (i.e. file.000 files). And I want to create a .png at some location as input. So my tools are: old debian-based OS, S57 as map format, navi2pg or ogr2ogr to ...
user avatar
  • 41
2 votes
1 answer
54 views

TileMill / Mapnik(?) reads numeric column as string

I have this shapefile: https://www.dropbox.com/sh/ywo8ofa02eel3k8/AAC6trz-nw6zD_Hfyzi1jxJHa?dl=0 I have TileMill installed on my computer running Arch Linux. I start the program up by navigating to ...
user avatar
  • 287
1 vote
0 answers
316 views

Own OSM map tile server seems not to render or is very slow

I have a problem with my own tile server. I tested it with https://download.geofabrik.de/europe/germany/bayern-latest.osm.pbf and everything works fine. At the beginning it took about 200 seconds to ...
user avatar
  • 11
2 votes
0 answers
21 views

Roads overwrite railways in deep tunnels

I'm trying to set up a tileserver to deliver a custom map of London's railway system using CartoCSS and Mapnik. London has overground lines, underground lines, a light railway and a tram system. I ...
user avatar
  • 121
1 vote
0 answers
45 views

How to create WMS using mapproxy with Mapnik XML file as input?

I have Mapnik generated XML file for mapproxy input, but I didn't understand how to manage this into mapproxy. I want to create WMS using mapproxy with Mapnik XML file input. My XML file: myxml_mapnik....
user avatar
  • 41
0 votes
1 answer
335 views

Generate or create OGC WMS using Python mapnik

I want to create an OGC WMS server from mapnik PostGIS using Python. I have successfully post table on PostGIS using: shp2pgsql -s 4326 /Users/apple/Downloads/111SHAPEFILE/Point.shp points | psql -d ...
user avatar
  • 41
0 votes
0 answers
99 views

How can I fix the error "failed to initialize projection" on Mapnik?

I have the "failed to initialize projection" problem in the current mac version 3.1.0. The error text: RuntimeError: failed to initialize projection with: '&srs900913;' In older issues ...
user avatar
  • 661
0 votes
0 answers
149 views

installing MAPNIK problems

I'm trying to install MAPNIK in ubuntu 16.04. I downloaded the files from here: https://github.com/mapnik/mapnik, and follow the instructions from here: https://github.com/mapnik/mapnik/blob/master/...
user avatar
2 votes
0 answers
183 views

Pre-rendering tiles fail, only once in a while

I've customized the https://github.com/Overv/openstreetmap-tile-server and broken it down into two images, a Tile-Server and a Postgis-Server. Both Tile Server and PostGIS Server are up and running in ...
user avatar
  • 121
1 vote
0 answers
160 views

How to create a tile from a TIFF stored in PostGIS using Mapnik in nodejs

I stored TIFF in the database using: raster2pgsql -c -C -s 4326 -f geom_raster -F -I evapo_01_201.tif -t 200x200 public.rasters | psql -U postgres -d gaaf -h localhost -p 5432 I think it's alright ...
user avatar
1 vote
0 answers
60 views

Convert styles to Mapnik 3 XML

I am using Ordnance Survey's OpenMap - Local in Mapnik 3.0. Ordnance Survey make stylesheets available here: https://github.com/OrdnanceSurvey/OS-OpenMap-Local-stylesheets Is there a way to convert ...
user avatar
1 vote
0 answers
59 views

I get a transparent/empty image with Mapnik in python from a raster file

I start by selecting a raster from the website of the Swiss Federal Office. Therefore, I know, with certainty, the projection in which this layer is located. Source : https://shop.swisstopo.admin.ch/...
user avatar
  • 11
1 vote
1 answer
121 views

Applying color style to GeoTIFF layer using Mapnik and Python

I am trying to apply a color style to a GeoTIFF using Mapnik. The code I'm using is: import mapnik map = mapnik.Map(800,600) map.srs = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' style = ...
user avatar
  • 93
0 votes
1 answer
142 views

Changing Mapnik style -- generating empty tiles/images

I got my osm2pgsql/PostGIS/Mapnik/Nik4 setup up and running. I have tested it with the openstreetmap-carto style and everything works well. Now I want to change the style to Mapbox' pencil style (...
user avatar
1 vote
1 answer
176 views

How to draw a marker with Mapnik?

After setting up a tile server accordingly this instruction https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/ my offline tile server working nicely. And after helping of ...
user avatar
  • 47
3 votes
1 answer
630 views

How to create a map to PNG file with specific box coordinates by Mapnik?

I recently manually built a tile server with this instruction -> https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/. I downloaded location data for Russia from ...
user avatar
  • 47
2 votes
1 answer
125 views

Styling a contour line to indicate the direction of elevation

I've just got a slippy map set-up using Mapnik to render OpenStreetMap data. I've loaded SRTM elevation data following the PostGIS steps here and can now see contour lines on the map. I'm trying to ...
user avatar
0 votes
1 answer
413 views

imposm3 on PostGIS to mapnik conversions

I am working with osm2psql and imposm3 to load a postgres db with OSM data. The performance of imposm3 is seemingly far in advance of osm2psql (to a factor of 4 i am finding). However I cannot find ...
user avatar
  • 4,827
1 vote
1 answer
409 views

Serve multiple map styles with mapnik and mod_tile from one server & database

I struggle to set up two different map styles for the mapnik-osm rendering tool chain. According to some help I already found on gis.stackexchange, I set up the renderd.conf for two map styles. But I ...
user avatar
  • 53
1 vote
1 answer
41 views

How to put a watermark at Mapnik tiles?

Maybe I have to add new layer with my PNG watermark at XML style, but how? I already tried to change somthing at XML, but don't understand how to add one global layer.
user avatar
1 vote
1 answer
30 views

Incorrect tiles from a shapefile are generated by mapnik

I used mapnik_node_tile_server to generate tiles from a shapefile created by gdal_contour. The tile generation function is: function fetchTile(layer, z, x, y, callback) { var map = new mapnik.Map(...
user avatar
3 votes
0 answers
53 views

Mapnik: Cannot get markers to overlap

I'm using the Natural Earth shapefile to generate maps of ethnographic data. For every location where I have evidence of (for example) whether men or women had the job of brewing beer, I want to show ...
user avatar
1 vote
1 answer
131 views

How can insert properties on a vector tile

I am trying to set up a web server in Node.js that serves vector tiles to be displayed in a browser using MapboxGL JS. The data for the vector tiles is stored in a Postgressql database with PostGIS ...
user avatar
  • 183
0 votes
0 answers
124 views

Import error with Mapnik in Anaconda 2

I'm using Anaconda to write geographic programs, so I need to use packages like Mapnik. After installing Mapnik in Anaconda2, it started to error. First about Mapnik itself and after do some actions ...
user avatar
  • 1
1 vote
0 answers
114 views

How to simulate way_pixels rules in GeoServer like in Mapnik?

Openstreetmap-carto project.mml have a queries like this: way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels Do I understand correctly that way_pixels just shows how many times ...
user avatar
  • 11
2 votes
0 answers
130 views

Mapnik XML mapfile projection of multiply layers [closed]

How to apply a multiply layer with Mapnik from EPSG:4326 TIFFs to EPSG:3875 projected tiles? I have two TIFF files, one containing the color-relief and the other the slope-shade (generated with GDAL, ...
user avatar
0 votes
1 answer
723 views

Local OSM Tile Server not rendering

I searched this issue in other topics but only found outdated topics with previous versions of Ubuntu. I'm using Ubuntu 18.04 in my laptop and I'm following the tutorial available at https://...
user avatar
  • 155
3 votes
1 answer
472 views

mapnik offline maps using generate_tiles_multiprocess.py

I've been working for a couple of days to get offline map tiles working for use in JXMapviewer2 but I am having trouble when using generate_tiles_multiprocess.py to process the tiles. My intention is ...
user avatar
  • 31
0 votes
1 answer
63 views

Mapnik: Can you draw outline/ strokes on Polygon geometries?

My data consists of a lot of polygons which need to be outlined. Unfortunately I cannot find any option on the PolygonSymbolizer - and my LineSymbolizer seems to be without effect. Here is my ...
user avatar
  • 111
1 vote
0 answers
24 views

Overlapping polygons produce rendering artifacts a low zoom [duplicate]

I have duplicated this problem in both QGIS and mapnik. For this question, I will show the problem using QGIS. I have imported heightmap images along a coastal area. I then added an overlay layer ...
user avatar
2 votes
1 answer
285 views

Prerendering OSM tiles with CartoCSS?

I've set up a PostGIS database and imported my map data. Then I ran render_list to render my tiles. Serving them through mod-tile works just fine. However, the files on my HDD are *.meta files and ...
user avatar
  • 271
1 vote
0 answers
268 views

Mapnik Slow tile generation with i9-990K, 64GB ram and NVME SSD Database

I have setup an OSM tile server following the guide at: https://switch2osm.org/manually-building-a-tile-server-18-04-lts and https://github.com/giggls/openstreetmap-carto-de. My database is stored on ...
user avatar
1 vote
1 answer
93 views

TileStache Internal Server Error

I was installing TileStache and and followed all the necessary steps, Upon running the tilestache-server.py file, It starts the server at http://127.0.0.1:8080/. And opening this into my browser gives ...
user avatar
1 vote
2 answers
257 views

Split long lines in PostGIS

I would like to render contours using Mapnik. The problem is that some contours are very long which makes rendering too slow and so I decided to spling long contours to multiple smaller segments. ...
user avatar
1 vote
0 answers
75 views

CentOS 7, Mapnik, and Tilestache: Seems like image assets are ignored by Mapnik's point/pattern symbolizers

[Update 6.6.2019] Ok...new detail. I checked a different Apache error log and discovered that it's littered with these errors, generically corresponding to.. failed to allocate png_ptr Actual ...
user avatar
  • 6,120
2 votes
1 answer
477 views

Improving Mapnik render time

I'm adding polylines (elevation curves) to a world map. Said polylines are stored in a PostgreSQL database from gdal_contour tool. The geometry columns (LineString, 3857) has a GIST index and a ...
user avatar
0 votes
1 answer
486 views

Using renderd on OSM tile server?

I followed this tutorial and have some troubles. When I restart and get status of the renderd service, I get the following error : renderd[8162]: An error occurred while loading the map layer '...
user avatar
2 votes
1 answer
220 views

Add PNG as a layer in Mapnik

I'm playing around with Mapnik and trying to add a PNG image over a map created from an XML file. This is my XML file: <Map background-color="white" minimum-version="0.7.2" srs="+init=epsg:3395"&...
user avatar
0 votes
1 answer
953 views

Adding custom layer to OSM data in switch2osm?

I'm new to switch2osm and I've created an OSM Tile Server with switch2osm on Ubuntu 16.04 LTS. It uses Apache, Mod_tile, renderd and Mapnik to render tiles. It uses PostgreSQL as DBMS and osm2pgsql to ...
user avatar
2 votes
1 answer
182 views

Mapnik LineSymbolizer for overlaping lines

I'm creating a map with Mapnik, and I have some trouble to correctly render overlapping lines. Fot instance let's consider this piece of XML: <Style name="ferry-routes"> <Rule> ...
user avatar
  • 574
0 votes
0 answers
58 views

Connect Mapnik to MSSQL

I want to connect Mapnik to MSSQL Spatial SDE, but I don't know how to do this. import mapnik m = mapnik.Map(256,256) mapnik.load_map(m, "test.xml") m.zoom_all() mapnik.render_to_file(m, "2.png") ...
user avatar
  • 101
0 votes
1 answer
278 views

Map tile not rendered on node-mapnik?

const mapnik = require('mapnik'); const sphericalmercator = require('@mapbox/sphericalmercator'); mapnik.register_default_fonts(); mapnik.register_default_input_plugins(); const TILE_HEIGHT = 256; ...
user avatar
  • 191
1 vote
0 answers
178 views

Build a tile server using MySQL as backend

I need to set up a tile server using MySQL but cannot find any documentation for it. I have done it with Postgres by following this link and it works fine. I understand that after downloading the ...
user avatar
2 votes
1 answer
555 views

Periodically updating OpenStreetMap tile server to keep it up to date?

I have successfully built my tile server by following this link (https://switch2osm.org/manually-building-a-tile-server-18-04-lts/) and open layers for viewing the tiles. How do I keep automate the ...
user avatar

1
2 3 4 5
8