Hot answers tagged

7 votes
Accepted

osm2pgsql vs imposm rendering performance

Besides hardware and other software, rendering performance depends on the database, custom indexes, and the SQL in the style rendered. The style makes a huge difference, and badly written layer ...
  • 1,487
5 votes
Accepted

artifacts in SRTM contour layers processed with GDAL tools and rendered with mapnik?

Here was my problem: No way the SRTM data is that messed up. The SRTM data IS that messed up. The warping above is actually in the DEMs in the SRTM3 dataset (downloaded from http://dds.cr.usgs.gov)...
5 votes
Accepted

Permission Denied when installing openstreetmap server

The problem you ran into has nothing to do with carto, it's an issue with your shell command, when you run sudo carto project.mml > OSMBright.xml carto runs as root, but the file write happens as ...
5 votes
Accepted

Custom tile server - how to create a layer using Mapnik and mod_tile using POSTGIS db

This page has an awesome tutorial on how to create a complete Tile server using the stack Mod_tile, renderd, mapnik, osm2pgsql, and a PostgreSQL/PostGIS database. If you already have a style created ...
  • 278
4 votes
Accepted

CartoCSS: labels along inside of polygon boundary

try to add this text-dy: -10; you can look at file admin.mss in openstreetmap-carto project dir and find code #nature-reserve-text[zoom >= 13][way_pixels > 192000] { text-name: "[name]"; ...
4 votes

pre-rendering for whole planet using render_list is very very slow

Firstly, that is a LOT of data/tiles you are rendering, so you should expect it to take a long time. You need to reconsider exactly what you are rendering. If you are using OSM_Bright and OSM data ...
  • 33.3k
4 votes

Drawing polygon border on inside only in Mapnik?

Yes, you can apply an offset. Indeed, the openstreetmap-carto style does this in CartoCSS: line-offset: -0.9; The final XML for Mapnik is: <LineSymbolizer offset="-0.9" stroke="#82643a" stroke-...
3 votes

How to install everything "geo" in Ubuntu?

In my experience using Ubuntu with GIS products will not be problematic. But you should try to keep to Long Term Support (LTS) versions of Ubuntu. The reasons are among others: Cutting edge versions ...
  • 3,153
3 votes

Generating vector tiles with Mapnik

You could find a good point to start here.
3 votes
Accepted

renderd not rendering

This issue happened due to an error in my configuration of renderd in /usr/local/etc/renderd.conf. Parts of the configuration file looked like th following snippet: [renderd] socketname=/var/run/...
  • 257
3 votes
Accepted

Merging layers from two vector tiles with Mapnik

2 years later but I've had some success doing what I think you want done using the tile-join tool in mapbox tippecanoe. It's opensource. https://github.com/mapbox/tippecanoe#tile-join Tile-join is ...
  • 398
3 votes

Rendering tm2 projects?

Preparing the vector PBF tiles is the first step. The MapBox Studio Classic is able to generate for you the vector PBF tiles (packed in MBTiles format) from any vector source (ShapeFiles, PostGIS, ......
  • 1,543
3 votes

Render all roads with an equal width in Mapnik

Take a look at Skeletron, which is a Python tool to merge adjacent lines. (Incidentally, I came here via your request in #osm IRC, but it would be polite for you to wait there a little more than 30 ...
3 votes
Accepted

How to export Mapnik style to XML?

You can use mapnik.save_map() import mapnik m = mapnik.Map(1440,800) # ... add styling and layers ... mapnik.save_map(m, "output.xml")
  • 2,605
3 votes

Tilestrata XML error

What you're encountering is an unfortunate side-effect of a breaking change in 0.4 of tilestrata-mapnik (changelog). When specifying the path to an XML file, use pathname instead of xml. This ...
3 votes

Link between tile server and QGIS

Install QuickMapServices Plugin (https://plugins.qgis.org/plugins/tags/qms/) Add your TMS source Enjoy
3 votes
Accepted

Mapnik on 64 bit Windows

According to http://mapnik.org/pages/downloads.html, there are only 32-bit builds for Mapnik 2.2.0 on Windows. https://gist.github.com/springmeyer/5651701 and https://github.com/mapbox/windows-builds ...
  • 75.7k
3 votes
Accepted

Show both label and icon for amenities using Carto CSS

You can add labels as attachments using a CartoCSS similar to this one: #layer { marker-width: 20; marker-fill: #EE4D5A; marker-fill-opacity: 0.9; marker-file: url('https://s3.amazonaws.com/...
  • 4,356
3 votes
Accepted

How to draw a marker with Mapnik?

You can find below a sample to do it. import json import mapnik mapnik_xml = "openstreetmap-carto/mapnik.xml" map_output = "region_map_mapnikXml.png" epsg_3857 = "+proj=merc +...
  • 29.5k
2 votes

Using pattern styled polygons in Tilemill

You can easily fill areas with textures and patterns by bringing in external images. You might create the patterns yourself in image editing software such as GIMP or Inkscape, or find ready-made ...
  • 2,049
2 votes

How to render Mapbox Vector Tiles from OSM data?

If you just want OpenStreetMap data in Mapbox Vector Tile format, MapZen provides this service for free: https://mapzen.com/projects/vector-tiles/ All the tooling required to do it is open: https://...
2 votes
Accepted

how to make mapnik style raster, not just render as solid color

In case anyone is interested, the problem above was a simple error on my part - the srs for the Layer was incorrect.
2 votes

Geojson not rendered with Mapnik

Things may be different from when you posted this originally. With current Mapnik versions (3.0.10 for example), this should work: <Style name="cities" filter-mode="first"> <Rule> &...
2 votes

Rendered tiles look stretched

I've found explanation here: https://help.openstreetmap.org/questions/13250/what-is-the-correct-projection-i-should-use-with-mapnik? And solved the issue by setting "input" srs-attribute for layer: &...
  • 121
2 votes

Using render_list to render only map extract

Try this script. It uses render_list utility in proper way and converts geo coordinates (WGS-84) to tile coordinates on several zoom levels and generates many tiles in one round. For example: ./...
  • 21
2 votes

using mod_tile in windows

You might try Maperitve as a lightweigt source of rendering tiles as well. It works on Windows on small and medium areas, and needs no database.
  • 75.7k
2 votes

Generating vector tiles with Mapnik

It's the other way around. Mapnik is software to render images from data. Vector tiles are data. You can use Mapnik to render images from Vector Tiles. You cannot use Mapnik to output Vector Tiles.
  • 9,848
2 votes

Displaying raster tiles from OSM data stored in a postgis server

In your case I would recommend to set up a WMS service using mapserver or something equivalent, and then requesting tiles from the WMS endpoint. http://mapserver.org/ogc/wms_server.html This is a ...
  • 2,963
2 votes

Starting Tile Sever Rendering Error: OSMBright.xml

I'm working on automating this guide so people won't have as much trouble, as I too struggled in some spots. Anyway your error is in this part of the guide: Double check and make sure this is all ...
  • 143
2 votes

Using OpenStreetMaps (*.pbf) data with Mapnik?

The world picture is rendered from a shapefile. For detailed maps, you need to put the openstreetmap data into a postgis database using osm2pgsql (not osmosis!). http://wiki.openstreetmap.org/wiki/...
  • 75.7k

Only top scored, non community-wiki answers of a minimum length are eligible