Osmarender/Frollo

From OpenStreetMap Wiki
Jump to: navigation, search

Frollo is no longer needed for OSM v0.5

Frollo is a pre-processor for Osmarender that sorts segments within ways. While it has been specifically designed to help Osmarender, it is usable as a standalone processor for any application that can benefit from better sorted segments in ways.

Frollo does three things:

  1. It sorts segments into a linear sequence. It prefers from-to connectedness over the given sort order of <seg> elements within ways.
  2. All segments that are pointing in the wrong direction are annotated with osma:reverse='1' to indicate that they should be processed the other way round. Note: it is the <seg> element of the way that is annotated because a <segment> might be used by more than one way, and may be correct in one and reversed in the other.
  3. Non-contiguous segments within a way are annotated with osma:sub-path='1'. This indicates discontinuities and logically breaks a way into a series of sub-ways or sub-paths. The first <seg> of each way is always flagged as the start of a sub-path.

Contents

Download

Frollo comprises two xsl templates that need to be run one after the other.

Get them from here: http://svn.openstreetmap.org/applications/rendering/osmarender4/frollo/

An xsl processor (xmlstarlet, xalan, etc) is required to be able to run the templates.

Usage

$ xmlstarlet tr frollo1.xsl data.osm /tmp/temp.osm
$ xmlstarlet tr frollo2.xsl /tmp/temp.osm data.osm

Output

In addition to sorting the <seg> elements within each way, Frollo adds the following attributes to the file:

Limitations

Personal tools
Namespaces
Variants
Actions
site
Toolbox