7
votes
Accepted
How to render PostGIS raster with Mapnik XML?
For those who will stumble on this question like me..
It appears that the plugin has been generated (https://github.com/strk/mapnik/tree/2.3.x-pgraster) and has been merged in official Mapnik Repo.
...
7
votes
Serving multiple styles from tile server
Just edit the renderd.conf and add a section for your second style (make sure the "URI" entry points to a different path than that of your default style). For example, my renderd.conf contains the ...
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 ...
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 ...
4
votes
Python, OGR and Mapnik: Possibility of passing existing ogr.Open() datasource into Mapnik without using mapnik.Ogr()?
Depending on your version of mapnik, yes it's possible. Mapnik 2.1 introduced the Python Plugin as a data source.
You would need to subclass mapnik.PythonDatasource and implement a features method ...
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 ...
3
votes
Accepted
mapnik rendering with OSM Carto style
First, the OSM "default" style resides here, along with instructions for deploying it.
You cannot import data in PostGIS without a style. Osm2pgsql requires a style file to function. There is one in ...
3
votes
Accepted
Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet
It's a bit high time I answered, but here goes:
Since the use of Wax is deprecated as you mentioned, here are some Mapbox examples to get you started. Bear in mind that the Leaflet API is embedded ...
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
votes
Orthographic reprojection with mapnik
The ortho projection does not cover the whole world, only the visible half.
Using the QGIS GUI, your globe would look like this:
What you see as nasty artefacts will kill the python script.
So you ...
3
votes
Accepted
Adding another style to an OpenStreetMap server using Mapnik, PostGIS, etc
The style is invoked in renderd.conf with something like
XML=/home/jburgess/osm/svn.openstreetmap.org/applications/rendering/mapnik/osm-local.xml
So you can exchange that call to another xml file, ...
3
votes
How can i set up the "own OSM" for own maps, having no relation to the current real spacial photos
It sounds like what you are really wanting is to be able to override specific tiles in a map.
I have implemented this with TileLayers in Google Maps in the past. Not sure how to do this with OSM, but ...
3
votes
Accepted
Python, OGR and Mapnik: Possibility of passing existing ogr.Open() datasource into Mapnik without using mapnik.Ogr()?
Stepping back, if you have data in PostGIS and you want to render it with Mapnik you really should be using Mapnik's native PostGIS support - aka mapnik.PostGIS datasource in python (https://github....
3
votes
Error while building OSMBright
Line 9 on your osm-bright.osm2pgsql.mml file, you left out a comma when adding the line "type": "shape",
You need to have proper JSON format.
3
votes
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/...
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, ......
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")
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 ...
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/...
3
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
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 +...
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:
./...
2
votes
Only Draw Geometric Objects Above 8th Parallel North
A straightforward way to do this - there is probably a faster way - is with ST_Difference against a constructed mask polygon:
SELECT
ST_Difference(ST_Transform(the_web_geom, 4326),
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mapnik × 392openstreetmap × 120
postgis × 61
tiles × 59
python × 40
tilemill × 34
cartocss × 25
rendering × 24
coordinate-system × 23
openlayers-2 × 20
tilecache × 17
tilestache × 16
qgis × 15
mapbox × 15
osm2pgsql × 15
style × 14
mod-tile × 14
postgresql × 13
geoserver × 12
shapefile × 12
vector-tiles × 11
raster × 10
gdal × 10
leaflet × 10
apache × 10