NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm trying to create an extremely basic Mapnik XML stylesheet, so that I can display purely all ways and nodes in an OSM extract, for debugging purposes. It doesn't need to look pretty.

I am running this against a flat-file .osm file, using the Geofabrik extract suggested at: http://wiki.openstreetmap.org/wiki/Mapnik/Rendering_OSM_XML_data_directly

I can't get the nodes to show - what am I doing wrong? The ways are showing fine.

<?xml version="1.0" encoding="utf-8"?>
<Map background-color="#f2efe9" srs="+proj=latlong +datum=WGS84">

       <Style name="highways">
                <Rule>
                        <Filter>[highway] <>''</Filter>
                        <LineSymbolizer stroke="#808080" stroke-width="2" stroke-linejoin="round" stroke-linecap="round" />
                </Rule>
        </Style>

        <Style name="nodes">
               <Rule>
                        <Filter>[mapnik:geometry_type]=point</Filter>
                        <PointSymbolizer file="./hospital.16.svg" />
                </Rule>
        </Style>
</Map>

asked 12 Feb '16, 10:36

fooquency's gravatar image

fooquency
765610
accept rate: 0%

edited 12 Feb '16, 16:19

You need to say what format of data that these rules apply to. If its data imported to PostGIS to osm2pgsql then most nodes will not be represented directly.

(12 Feb '16, 11:44) SK53 ♦

It'd be useful for someone to post a minimal mapnik.xml (or a minimal TileMill style) that can be used for people to start from when creating their own styles (perhaps for transparent overlay tiles).

(12 Feb '16, 12:30) SomeoneElse ♦
1

@SK53: Have clarified that I'm using a flat-file .osm extract.

(12 Feb '16, 16:18) fooquency

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×341

question asked: 12 Feb '16, 10:36

question was seen: 1,786 times

last updated: 12 Feb '16, 16:19

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum