Hot answers tagged

10

Few pointers to get you started. You've already done some research, so you know the right places to look for more info: Don't use a Markers layer. Do use a Vector layer. Vector layer can be styled. Each of your points can have attributes e.g. "color:blue" or "severity:moderate" and based on those attributes you can Style the points with different icons ...


8

I don't think mapnik or proj4 are able to render that kind of projection. According to that excellent post, Openlayers with protovis library would be able to render not exactly the Waterman projection but the Fuller projection (also called Dymaxion). You even have an online example here.


8

Mapnik in general works fine with both 32bit and 64bit python versions 2.4 -> 3.2 (on linux and mac osx). On Windows, however the most recent binaries available are for Mapnik 0.7.1, and those binaries only provide the python bindings compiled against 2.5 and 2.6. So, 2.7, whether 32 or 64bit will not work for those binaries. We plan to provide new windows ...


7

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. The branch is 2.3.x (https://github.com/mapnik/mapnik/tree/2.3.x) Now you can build Mapnik from the branch and use PGRaster plugin to use Raster data from ...


7

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 sections [default] XML=/etc/mapnik-osm-carto-data/osm.xml URI=/osm/ DESCRIPTION=This is the standard osm mapnik style HOST=host.my CORS=* MINZOOM=0 MAXZOOM=20 [...


6

I would put the db (and mapnik) on one server and the cache on another. The work of the database and mapnik is a tough job but you can do it anytime. You can have the database and mapnik on a quite weak server. After you have seeded your tiles you just have to reseed when you have done someediting or there have been changes. I haven't played with ...


6

(Cross-posting from GitHub for the benefit of StackExchangers..) Both filters must be connected to a layer selector. There are two options that require only specifying the style once: #tor_centreline [FCODE=201200], #tor_centreline [FCODE=201201] { line-width: 0.5; line-color: lightgray; } or #tor_centreline { [FCODE=201200], [FCODE=201201] { ...


6

You should try TileMill. It uses gdal to access the geo-data, an editor of Carto (a css like language) to stylize your maps, and mapnick to renderize it.


6

Like some suggested... I think your path from now should be: Put data in some format supported by TileMill (if you want simplest, go with shapefiles, otherwise PostGIS database) In Tilemill, load your data and define the symbolisation for your map, then export a Mapnik XML config file. You can use this XML file together with generate_tiles.py script to ...


6

There is a brandnew Qtile plugin, but only available for the latest Qgis Master version 1.9.0: Qtiles Announcement


6

It's clear that it's not necessary to shift the projection, but the data. Using GDAL >= 1.10.0 compiled with SQLite and SpatiaLite: ogr2ogr russia_shifted.shp world.shp -dialect sqlite -sql "SELECT ShiftCoords(geometry,360,0) FROM world WHERE CNTRY_NAME='Russia'" where shiftX = 360 (degrees) and shiftY = 0. UPDATE: here's the whole workflow... Clip world....


5

Why don't you try the OSGEO Live DVD, check this website for more information and download.


5

The problem was almost certainly that you had a stray bracket: renderd[8967]: An error occurred while loading the map layer 'default': Shape Plugin: shapefile '/usr/local/share/world)boundaries/shoreline_300.shp' does not exist (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml') Note: world ) boundaries Can you close ...


5

How big is your area of interest? For small regions (like a city, metropolitan area, or district), you can download data by BBOX using OSM Overpass API. For bigger areas - up to 24000000 sq km - BBike extract service will provide what you want. Anything bigger requires downloading continental extract/whole database dump, and clipping to BBOX using software ...


5

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 your normal permission level, to do what your looking for you can sudo sh -c "carto project.mml > OSMBright.xml"


5

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 definitions can result in abysmal performance. If you change the database schema, it requires changing both the custom indexes and layer SQL, so it's not possible to ...


5

This page has a awesome tutorial of 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 by the Tilemill you can export to the Mapnik format and use it to generate your tiles and render with frameworks like OpenLayers and Leaflet.


4

I needed my TileCache configuration to look like this: [osm] type=Mapnik mapfile=/var/maps/bin/mapnik/osm.xml spherical_mercator=true I also needed to use a TMS layer type in OpenLayers. Everything is better now!


4

Slippy maps typically use the EPSG 3857 projection (another name for 900913, Google Web Mercator). In your stylesheet, change all occurrences of +proj=latlong +datum=WGS84 to +init=epsg:3857 to use the Spherical Mercator projection.


4

switch2osm will give you some directions to go as far as serving OSM tiles. Two caveats: Only 0.01% of people actually should do this. Think about using OSM's tiles, or MapQuest Open, or MapBox. Hosting your own tiles will take at least a week's work. Using Windows for this will be a losing battle. Don't.


4

The default OSM preview page's URL is ip_address:port_number/osm/preview.html#10/37.8000/-122.2600 which indicate the zoom level is 10, so I guess you did not export mbtiles file up to that zoom level that's why TileStache generates empty page then you could manually change the zoom level and lat/lon value to force TileStache to work out preview page. I ...


4

It sounds like you first tried a source install of Mapnik. At this time input plugins were properly installed into the default directory at /usr/local/lib/mapnik/input. But the postgis plugin was not built because you did not have the pg_config program available and/or the postgres-devel package. If you followed http://github.com/mapnik/mapnik/wiki/...


4

This question was answered here: http://support.mapbox.com/discussions/tilemill/1773-tilemill-shows-black-lines-around-raster-layers-2. Solution: use VRT files to reference multiple rasters.


4

There are a couple of options that might help you get the result you're after: You could do this with the Python Imaging Libary (PIL) using the getcolors method on a image. For example: from PIL import Image im = Image.open(tile_path) max_colors = 2 #if max colors is exceded in getcolors it returns None if not im.getcolors(max_colors): #mark solid ...


4

Mapnik itself is basically just a rendering engine. As I understand, it can be used to render anything from tiles, to 8.5"x11", and even plotter-sized PDFs. To describe it very simply, Mapnik takes your data inputs, a spatial boundary, and a set of symbology styles (either hard-coded or an XML source), then it renders the map (potentially just a simple tile) ...


4

MapServer does support label LEADER since 6.2. http://mapserver.org/mapfile/leader.html Example:


4

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). After examining DEMs from the improved SRTM4 dataset (available here) I found that most of these "gaps" were filled by interpolation but other issues (...


4

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]"; text-face-name: @book-fonts; text-fill: green; text-halo-radius: 1.0; text-halo-fill: rgba(255,255,255,0.6); text-placement: line; text-dy: -10; } ...


4

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 for the entire world at all zoom levels then consider more scale dependent rendering so that at the lower zoom levels, you are attempting to render less data. ...


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