Monday, 9 July 2018

postgis - Planet_osm_point versus Planet_osm_nodes for querying places


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!



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...