Skip to main content

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
0 votes
0 answers
14 views

Getting blank tiles when using to serve GeoTIFF files using mod_tile server

I'm stuck in one issue where I have GeoTIFF files and I want to use mod_tile but the problem is after trying everything I am still getting balnk tile in API response. I tried to generate same tile ...
kush's user avatar
  • 1
0 votes
0 answers
35 views

MapProxy and Mapnik missing layers for some tiles only

I'm using MapProxy to serve OSM tiles rendered by Mapnik and displaying them using OpenLayers; in general it seems to be working but the problem is that at all zoom levels some of the tiles seem to be ...
Phil's user avatar
  • 1
0 votes
1 answer
201 views

Local OSM Tiles - ways to reduce number of tiles

I'm developing a PC application that uses local OSM tiles. I'm using OSM docker from switch2osm to generate XYZ .png tiles for a given area and supply directory with tiles to our clients with our app. ...
user208190's user avatar
0 votes
0 answers
132 views

Eliminate black border around nodata/alpha of GeoTIFF converted by rasterio

I have an image (png) that I want to place on a map: I use rasterio to georeference the picture: import rasterio as rio import warnings from pathlib import Path from typing import Tuple from rasterio....
Alex's user avatar
  • 714
0 votes
0 answers
25 views

Mapnik PointSymbolizer - dynamic svg path from column

I want to visualize a shapefile with points, where each point should be rendered with a different symbol. The paths to symbols are provided in a column in the shapefile. This is my current stylesheet....
Alex's user avatar
  • 714
0 votes
0 answers
56 views

Cannot properly link mapnik with CMake

I installed mapnik 4.0.0. Then I tried to compile an example: #include <mapnik/map.hpp> #include <mapnik/load_map.hpp> #include <mapnik/agg_renderer.hpp> #include <mapnik/image....
syat-cd's user avatar
0 votes
0 answers
125 views

Map layer 'ajt' fails to load

After following the tutorial from Switch2OSM I ran into the following error after running this command: renderd -f -c /usr/local/etc/renderd.conf and launching the server through the web browser using ...
Jaime Miranda Ramirez's user avatar
1 vote
1 answer
285 views

mapnik-renderd error: FATAL: role "_renderd" does not exist

mapnik-renderd error: FATAL: role "_renderd" does not exist I've been following this tutorial to making an osm tile server on Ubuntu 20.04 (WSL), but after restarting the renderd service ...
Maria's user avatar
  • 21
0 votes
1 answer
46 views

Mapnik Input of Mercator Flat File

I'm just starting with Mapnik. I followed an example found online to dump an input datasource into a small output image. So far, so good. Now I want to read a 16384x12800 PNG file I have. It's a ...
Brian White's user avatar
2 votes
0 answers
100 views

Mapnik image render not corresponding to generated tiles

I successfully manage to install a tile server using Mapnik following this tutorial: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-22-04-lts/ The tiles are fine and look ...
jpmaps's user avatar
  • 21
2 votes
1 answer
528 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 ...
BradHards's user avatar
  • 12.9k
1 vote
1 answer
372 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 ...
alsaleem's user avatar
  • 187
0 votes
1 answer
127 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 ...
BFlat's user avatar
  • 394
0 votes
1 answer
155 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 ...
ygroeg's user avatar
  • 41
1 vote
0 answers
91 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 ...
ygroeg's user avatar
  • 41
3 votes
1 answer
449 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 ...
ygroeg's user avatar
  • 41
2 votes
1 answer
67 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 ...
Username's user avatar
  • 297
2 votes
0 answers
969 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 ...
Djut28's user avatar
  • 21
3 votes
0 answers
33 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 ...
amaca's user avatar
  • 131
1 vote
0 answers
149 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....
Ayush's user avatar
  • 41
0 votes
1 answer
702 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 ...
Ayush's user avatar
  • 41
0 votes
0 answers
322 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 ...
Gerd's user avatar
  • 751
2 votes
0 answers
378 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 ...
suneet's user avatar
  • 121
1 vote
0 answers
357 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 ...
Matheus Toniolli's user avatar
1 vote
0 answers
190 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 ...
Dan Winchester's user avatar
1 vote
0 answers
131 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/...
cedser's user avatar
  • 11
2 votes
1 answer
298 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 = ...
mkdev's user avatar
  • 121
0 votes
1 answer
259 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 (...
user2316602's user avatar
1 vote
1 answer
461 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 ...
Kaanr's user avatar
  • 47
3 votes
1 answer
1k 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 ...
Kaanr's user avatar
  • 47
2 votes
1 answer
221 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 ...
algorhythm's user avatar
0 votes
1 answer
576 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 ...
Hairy's user avatar
  • 4,841
1 vote
1 answer
750 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 ...
Andreas's user avatar
  • 83
1 vote
1 answer
89 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.
Windows Eight's user avatar
1 vote
1 answer
49 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(...
David Osipyan's user avatar
3 votes
0 answers
122 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 ...
Lars Marius Garshol's user avatar
2 votes
1 answer
318 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 ...
Javier's user avatar
  • 233
0 votes
0 answers
171 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 ...
saman's user avatar
  • 1
3 votes
1 answer
197 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 ...
cub4d's user avatar
  • 31
2 votes
0 answers
235 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, ...
Joost Döbken's user avatar
0 votes
1 answer
2k 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://...
CaD's user avatar
  • 417
3 votes
1 answer
840 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 ...
Gregws's user avatar
  • 31
0 votes
1 answer
126 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 ...
nauti's 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 ...
user8908459's user avatar
2 votes
1 answer
516 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 ...
Fang's user avatar
  • 301
1 vote
0 answers
393 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 ...
Osama Shabrez's user avatar
1 vote
1 answer
111 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 ...
Rao Taha's user avatar
1 vote
3 answers
372 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. ...
Martin Ždila's user avatar
1 vote
0 answers
92 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 ...
elrobis's user avatar
  • 6,466
2 votes
1 answer
780 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 ...
user2700551's user avatar

1
2 3 4 5
8