Files
Nominatim/docs/develop/osm2pgsql-tables.svg
Sarah Hoffmann a069479340 docs: section about database layout
Replaces the import description which basically was
table layout only now.
2021-10-29 12:03:22 +02:00

58 lines
13 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="354px" preserveAspectRatio="none" style="width:534px;height:354px;background:#FFFFFF;" version="1.1" viewBox="0 0 534 354" width="534px" zoomAndPan="magnify"><defs><filter height="300%" id="fofrw86h3kqrc" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#EEEEEE" filter="url(#fofrw86h3kqrc)" height="64.8906" style="stroke:#383838;stroke-width:1.5;" width="145" x="7" y="29.5"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="131" x="14" y="42.6387">planet_osm_nodes</text><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="152" y1="47.4688" y2="47.4688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="8" x="15" y="58.751">id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="36" y="58.751">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="31" x2="31" y1="47.4688" y2="63.1094"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="152" y1="63.1094" y2="63.1094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="12" x="13" y="74.3916">lat</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="36" y="74.3916">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="31" x2="31" y1="63.1094" y2="78.75"/><line style="stroke:#383838;stroke-width:1.0;" x1="7" x2="152" y1="78.75" y2="78.75"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="14" x="12" y="90.0322">lon</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="16" x="36" y="90.0322">INT</text><line style="stroke:#383838;stroke-width:1.0;" x1="31" x2="31" y1="78.75" y2="94.3906"/><rect fill="#EEEEEE" filter="url(#fofrw86h3kqrc)" height="64.8906" style="stroke:#383838;stroke-width:1.5;" width="138" x="203.5" y="29.5"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="124" x="210.5" y="42.6387">planet_osm_ways</text><line style="stroke:#383838;stroke-width:1.0;" x1="203.5" x2="341.5" y1="47.4688" y2="47.4688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="8" x="219" y="58.751">id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="247.5" y="58.751">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="242.5" x2="242.5" y1="47.4688" y2="63.1094"/><line style="stroke:#383838;stroke-width:1.0;" x1="203.5" x2="341.5" y1="63.1094" y2="63.1094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="29" x="208.5" y="74.3916">nodes</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="247.5" y="74.3916">BIGINT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="242.5" x2="242.5" y1="63.1094" y2="78.75"/><line style="stroke:#383838;stroke-width:1.0;" x1="203.5" x2="341.5" y1="78.75" y2="78.75"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="21" x="212.5" y="90.0322">tags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="247.5" y="90.0322">TEXT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="242.5" x2="242.5" y1="78.75" y2="94.3906"/><rect fill="#EEEEEE" filter="url(#fofrw86h3kqrc)" height="111.8125" style="stroke:#383838;stroke-width:1.5;" width="128" x="392.5" y="7"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="114" x="399.5" y="20.1387">planet_osm_rels</text><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="24.9688" y2="24.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="8" x="417" y="36.251">id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="454.5" y="36.251">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="24.9688" y2="40.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="40.6094" y2="40.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="25" x="408.5" y="51.8916">parts</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="454.5" y="51.8916">BIGINT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="40.6094" y2="56.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="56.25" y2="56.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="47" x="397.5" y="67.5322">members</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="454.5" y="67.5322">TEXT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="56.25" y2="71.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="71.8906" y2="71.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="21" x="410.5" y="83.1729">tags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="454.5" y="83.1729">TEXT[]</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="71.8906" y2="87.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="87.5313" y2="87.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="39" x="401.5" y="98.8135">way_off</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="454.5" y="98.8135">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="87.5313" y2="103.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="392.5" x2="520.5" y1="103.1719" y2="103.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="31" x="405.5" y="114.4541">rel_off</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="454.5" y="114.4541">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="449.5" x2="449.5" y1="103.1719" y2="118.8125"/><rect fill="#F8F8F8" filter="url(#fofrw86h3kqrc)" height="158.7344" style="stroke:#383838;stroke-width:1.5;" width="135" x="205" y="182"/><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="38" x="253.5" y="195.1387">place</text><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="199.9688" y2="199.9688"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="214.5" y="211.251">osm_type</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="44" x="277" y="211.251">CHAR(1)</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="199.9688" y2="215.6094"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="215.6094" y2="215.6094"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="221.5" y="226.8916">osm_id</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="34" x="277" y="226.8916">BIGINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="215.6094" y2="231.25"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="231.25" y2="231.25"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="227" y="242.5322">class</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="277" y="242.5322">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="231.25" y2="246.8906"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="246.8906" y2="246.8906"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="22" x="227.5" y="258.1729">type</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="23" x="277" y="258.1729">TEXT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="246.8906" y2="262.5313"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="262.5313" y2="262.5313"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="28" x="224.5" y="273.8135">name</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="277" y="273.8135">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="262.5313" y2="278.1719"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="278.1719" y2="278.1719"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="38" x="219.5" y="289.4541">address</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="277" y="289.4541">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="278.1719" y2="293.8125"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="293.8125" y2="293.8125"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="47" x="215" y="305.0947">extratags</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="42" x="277" y="305.0947">HSTORE</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="293.8125" y2="309.4531"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="309.4531" y2="309.4531"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="57" x="210" y="320.7354">admin_level</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="51" x="277" y="320.7354">SMALLINT</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="309.4531" y2="325.0938"/><line style="stroke:#383838;stroke-width:1.0;" x1="205" x2="340" y1="325.0938" y2="325.0938"/><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="48" x="214.5" y="336.376">geometry</text><text fill="#000000" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="58" x="277" y="336.376">GEOMETRY</text><line style="stroke:#383838;stroke-width:1.0;" x1="272" x2="272" y1="325.0938" y2="340.7344"/><!--MD5=[cfd242390168b76ecd29e738a0804d67]
link planet_osm_nodes to planet_osm_ways--><!--MD5=[fa5350d6785809323ef22057335ae1c7]
reverse link planet_osm_nodes to planet_osm_ways--><path codeLine="41" d="M153.5,53.5 C176.41,53.5 179.59,69.5 202.5,69.5 " fill="none" id="planet_osm_nodes-backto-planet_osm_ways" style="stroke:#383838;stroke-width:1.0;"/><polygon fill="#383838" points="153.5,53.5,162.5,57.5,158.5,53.5,162.5,49.5,153.5,53.5" style="stroke:#383838;stroke-width:1.0;"/><!--MD5=[fb2ee53a59aef357360ab5aad89040fd]
link planet_osm_ways to planet_osm_rels--><!--MD5=[09a44a38c707cfce4bf3674282185755]
link planet_osm_ways to place--><!--MD5=[ab53e24c49396b9d4317735d0a875517]
@startuml
skinparam monochrome true
skinparam ObjectFontStyle bold
map planet_osm_nodes #eee {
id => BIGINT
lat => INT
lon => INT
}
map planet_osm_ways #eee {
id => BIGINT
nodes => BIGINT[]
tags => TEXT[]
}
map planet_osm_rels #eee {
id => BIGINT
parts => BIGINT[]
members => TEXT[]
tags => TEXT[]
way_off => SMALLINT
rel_off => SMALLINT
}
map place {
osm_type => CHAR(1)
osm_id => BIGINT
class => TEXT
type => TEXT
name => HSTORE
address => HSTORE
extratags => HSTORE
admin_level => SMALLINT
geometry => GEOMETRY
}
planet_osm_nodes -[hidden]> planet_osm_ways
planet_osm_ways -[hidden]> planet_osm_rels
planet_osm_ways -[hidden]-> place
planet_osm_nodes::id <- planet_osm_ways::nodes
@enduml
PlantUML version 1.2021.12(Tue Oct 05 18:01:58 CEST 2021)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>