Tuesday, 18 August 2015

qgis - Completing roads output of PostGIS?


I converted the file I exported from OSM to PostGIS using osm2pgsql. I have opened the table's outputs to QGIS and I saw data are not complete compare to OSM editor view. Most of the roads are broken and out of align.



Screenshot of broken and unaligned line


How do I complete them?



Answer



The planet_osm_roads table in POSTGIS is only designed for rendering at lower zoom levels.


For higher zoom levels, take the planet_osm_line table and filter for features with highway.


If you still don't see all roads: How did you get the data from OSM? The export function might skip ways that are not completely inside the view. You better use the Overpass API or Geofabrik regional extracts instead.


For the alignment issue: In QGIS, Set CRS for Layer for the postgis layer to EPSG:3857, since EPSG:900913 is not in the CRS database of QGIS.


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...