NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I downloaded OSM data from Geofabrik and saved it in a Spatialite database. Now I want to select all the buildings from my region and save it in a separate table. Is there a way to do this in Spatialite with a Inner Join between the osm nodes id/tags tables and the way id/tags tables?

asked 10 Sep '17, 18:42

terra03032006's gravatar image

terra03032006
11112
accept rate: 0%

1

How did you convert from .osm.pbf (or .osm.bz2) to Spatialite? The software used for that will determine the options you have.

(10 Sep '17, 18:48) Frederik Ramm ♦

I used the spatial_osm_raw tool like this: spatial_osm_raw -o region.osm.pbf -d my_data.sqlite

(10 Sep '17, 18:52) terra03032006

Are you really sure you want to go down this (hard) route which would require that you manually collect the nodes for building ways (as well as the ways and nodes for building relations!) when using spatialite_osm_map (instead of spatialite_osm_raw) promises to handle all this for you automatically?

(10 Sep '17, 18:56) Frederik Ramm ♦

I am not using these tools myself but when searching for the name of the tool on the web, I found https://www.gaia-gis.it/fossil/spatialite-tools/wiki?name=OSM+tools which seems to explain that spatialite_osm_map already gives you tables for the individual feature types, including (I suppose) buildings!

(10 Sep '17, 19:00) Frederik Ramm ♦

ya but I want to work with the raw data, are there some links which can help me to achieve my goal?

(10 Sep '17, 19:11) terra03032006

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×118
×8

question asked: 10 Sep '17, 18:42

question was seen: 1,963 times

last updated: 10 Sep '17, 19:11

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum