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
1answer
31 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 ...
1
vote
0answers
28 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 ...
0
votes
0answers
25 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 ...
3
votes
1answer
127 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 ...
2
votes
1answer
51 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 ...
1
vote
0answers
144 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 ...
2
votes
0answers
20 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 ...
1
vote
0answers
33 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....
0
votes
0answers
18 views

Add Placemarks to Local Tile Server

I built an Open Street Maps tile server using the instructions found here: https://www.linuxbabe.com/ubuntu/openstreetmap-tile-server-ubuntu-18-04-osm It works fine. Now I want to add objects such as ...
0
votes
1answer
248 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 ...
0
votes
0answers
53 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 ...
0
votes
0answers
81 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/...
2
votes
0answers
100 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 ...
1
vote
0answers
113 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 ...
0
votes
0answers
40 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 ...
1
vote
0answers
45 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/...
1
vote
1answer
82 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 = ...
0
votes
1answer
104 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 (...
1
vote
1answer
112 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 ...
3
votes
1answer
464 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 ...
2
votes
1answer
99 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 ...
0
votes
1answer
382 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 ...
1
vote
1answer
284 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 ...
1
vote
1answer
36 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.
1
vote
1answer
18 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(...
3
votes
0answers
43 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 ...
1
vote
1answer
106 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 ...
0
votes
0answers
109 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 ...
1
vote
0answers
90 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 ...
2
votes
0answers
105 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, ...
0
votes
1answer
494 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://...
3
votes
1answer
438 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 ...
0
votes
1answer
47 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 ...
1
vote
0answers
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 ...
2
votes
1answer
248 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 ...
1
vote
0answers
194 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 ...
1
vote
1answer
87 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 ...
1
vote
2answers
223 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. ...
1
vote
0answers
74 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 ...
2
votes
1answer
430 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 ...
0
votes
1answer
371 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 '...
2
votes
1answer
189 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"&...
0
votes
1answer
761 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 ...
2
votes
1answer
169 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> ...
0
votes
0answers
50 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") ...
0
votes
1answer
240 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; ...
1
vote
0answers
154 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 ...
2
votes
1answer
514 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 ...
1
vote
1answer
48 views

Mapnik upsampled raster isn't smooth

I'm using Mapnik to show a map with hillshading. It works well when displaying it up to my tiff's native resolution and a little bit above, for instance at zoom 13 (dataset is SRTM30): But then if I ...
2
votes
0answers
359 views

Mapnik / OSM data not rendering correctly

I was wondering if someone could help me with a problem that I'm having rendering some maps with mapnik and OSM data. I'm imported the Australia OSM data from geofabrik into postgis, using osm2pgsql, ...

1
2 3 4 5
8