Toolserver:List of projects that highlight OSM ways
This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.
Projects that extract and display way or area data of Openstreetmap. Helpful for the GeoShape project.
Thomas' bicycle-map
edituses Vector rendering of toolserver
Relation Analyzer for OSM
editby Adrian
uses Java+SpringFramework
PostGIS Terminal
editSimilar in display and db but not storing shapes in db. uses EOSMDBOne / Osm2pgsql, PGSql, Openlayers. Programming in JavaScript, PHP see #Sql Examples unten
OSM Inspector
editby Geofabrik Tools, background not public
OpenStreetBrowser 2.0
editby Stephan P.
- http://wiki.openstreetmap.org/wiki/OpenStreetBrowser
- http://www.sotm-eu.org/slides/29_StephanPlepelits_OpenStreetBrowser2.pdf
- Example: Mariahilf in OSB (rel_ Nummer in url ist osm kompatibel)
- GNU Affero General Public License (AGPLv3) Source
- usesPostgreSQL 9.0 + PostGIS 1.5,
- osmosis (pgsql_simple_schema) for analyse and osm2pgsql for rendering [DOCU file]
- Mapnik 0.7.1/mod_tile/renderd, Cascadenik (not Tirex)
- OpenLayers 2.9
- Osmosis 1.5.1 for updating database + stored procedure OsmosisUpdate
data from original .osm is processed by osmosis (--write-pgsql-dump to $ROOT_PATH/data/) to get the dump which can be loaded into osmosis-db (pgsql_simple_load.sql), the style-xml files(?) are created and with the dumps? rendered to get tiles (probably) and site-specific categorydata.
Tables
edit'''osm_point''' osm_id text ''node_65'' osm_tags hstore osm_way POINT (900913) '''osm_line''' (without osm_polygon-s) osm_id text ''way_13'' osm_tags hstore osm_way LINESTRING (900913) '''osm_rel''' (without osm_polygon-s) osm_id text ''rel_72'' osm_tags hstore osm_way GEOMETRY (900913) member_ids text[] ''['node_24','way_26','rel_27','error_29']'' member_roles text[] ''['from','to','via']'' '''osm_polygon''' osm_id text ''way_13'' ''rel_77'' rel_id text ''NULL'' ''rel_77'' osm_tags hstore ''..'' ''..'' osm_way GEOMETRY (900913) ''..'' ''..'' member_ids text[] '' '' ''['node_4','way_6','rel_7','error_9']'' member_roles text[] '' '' ''['outer','inner']'' ___ Licence of this text: GNU Affero General Public License (AGPLv3) (see above) ====Sql Functions==== 01_tables_functions.sql: '''way_get_geom''' (wayid) RETURNS ways(4326) --without using ways.linestring '''rel_get_geom''' (relid, dummy) RETURNS nodes_and_ways(4326) --no sub relations browsed '''node_assemble_tags''' (nodeid) RETURNS hstore '''way_assemble_tags''' (wayid) RETURNS hstore '''rel_assemble_tags''' (relid) RETURNS hstore '''assemble_point''' (nodeid) RETURNS boolean >osm_point '''assemble_line''' (wayid) RETURNS boolean >osm_line '''assemble_rel''' (relid) RETURNS boolean >osm_rel '''assemble_polygon''' (wayid) RETURNS boolean >osm_polygon '''assemble_multipolygon''' (relid) RETURNS boolean >osm_polygon ..(900913) 01_multipolygon.sql '''make_multipolygon''' (way[]) returns rings --helper for build_multipolygon '''build_multipolygon''' (outer_way[], inner_way[]) returns multipolygon 02_update_tables.sql '''osmosisUpdate''' () RETURNS void --called by Osmosis ___ Licence of this text: GNU Affero General Public License (AGPLv3) (see above)
Multipolygon processing
editOpenStreetBrowser uses PostGIS functions in a plpgsql script for creating the derivate tables that OpenStreetBrowser is based on, including the table osm_polygon. The inner and outer roles have to be tagged as such. The 'seperated polygons' situation should work, with holes in all of the islands. Todo: The 'connected-holes' and 'connected polygons' situation? Todo: The 'holes in holes' situation? Algorithm:
- Find all ways tagged with 'outer' role for a multipolygon-relation
- Ring Assignment:
- Take all closed ways aside
- Merge the rest with ST_LineMerge and again, take all closed ways aside
- Collect the closed ways (rings) with ST_Collect
- Find all ways tagged with 'inner' role
- Ring Assignment as above
- Substract the inner way collection from outer way collection with ST_Difference
Nested Relations
editOpenstreetbowser currently doesnt support sub-relations.01_tables_functions.sql --geom_rels:=..
Updating
editby the osmosisUpdate() stored procedure
Lonvia
edit- [hiking.lonvia.de hiking.lonvia.de]
- http://dev.lonvia.de/trac/wiki/OsgendeFramework
- http://dev.lonvia.de/trac/browser/README which is in the GNU GENERAL PUBLIC LICENSE V.3 Source
uses Osgende Python-framework
- Osmosis, PGSql, PostGIS, Mapnik, OpenLayers. Osmosis Data in Snapshot Schema[1], [2].
- psycopg, Shapely (Python bindings for osmosis and the geos library)
Tables
edit- http://dev.lonvia.de/trac/browser/tools/dumper/schema_setup.sql
- http://dev.lonvia.de/trac/wiki/HikingMap then locally ./db/src/makedb.py
makedb.py, conf.py '''guideposts''' id bigint, name text, ele text, POINT"900913" '''networknodes''' --network nodes (as used in the Netherlands) rwn_ref '''routes''' name text - the default name, generally taken from name-tag however, if the name is entirely in non-latin symbols, name:en is prefered if existing intnames hstore - collection of translated names symbol text - unique name of the computed shield to use country char(3) - coutry the route is mainly in (in terms of numbers of sections, TODO check this heuristic) network varchar(2) - special network it belongs to, may affect rendering, default is '' level int - importance in network with 0 being the most important top boolean - if false then route constitutes only a subsection of GEOMETRY "900913" another route, check hierarchy table for potential parents '''segments''' --Segments are the basic way system of the network. id bigserial nodes bigint[], country type? ways bigint[], rels bigint[] LINESTRING "900913" '''countries''' --country polygons id bigint, code varchar(2), GEOMETRY"900913" '''defstyle''' -- style information for the default style '''changed_objects''' -- changed geometries ? action char(1), GEOMETRY"900913" osmosis_update_proc.sql, models.py '''node_changeset''' (id bigint, action char); '''way_changeset''' (id bigint, action char); '''relation_changeset''' (id bigint, action char) '''hierarchy''' -- hierarchy.py, relation relations parent bigint, child bigint, depth int '''relation_hierarchy''' --relationModels.py, Django --depth < 10 parent The parent relation child A sub-ordinate relation of parent a relation always has itself as a child with depth 0 depth Number of levels the child relations is below the parent level The level row of the parent relation. (see below) top A boolean stating, whether the parent is a top-level relation. __ Licence of this text: GNU GENERAL PUBLIC LICENSE V.3 (see Lonvia Source above)
Functions
editMultipolygon processing
editNested Relations
editUpdating
editby the osmosisUpdate() stored procedure osmosis_update_proc.sql
Sharemap.org
edit- based on flash