[GIS] Planet_osm_point versus Planet_osm_nodes for querying places

openstreetmaposm2pgsqlpostgis

Hello I am using a PostGis Database with OSM Data. After importing the data with osm2pgsql in slim mode I found a table named Planet_osm_nodes that has places also. It seems really compressed and has all the metadata in the tags field.
Now I don't really know which of these two tables I should use regarding completeness of the data and performance.
If anyone of you has any thoughts and experiences on this topic it would be great!

Best Answer

planet_osm_node contains the point data in the same way they are stored in the OSM database. These nodes can contain attribute information, or are just part (vertices) of ways.

planet_osm_point is a subset of the node table, containing only the points with attributes, but not the vertices. Furthermore, it has a geometry column to use with GIS applications. That's why a postgis connection only shows this table, unless you allow for geometryless tables too. Spatial indices are built on this table, not the node one.