1

I downloaded a Delaware OSM file from the Geofabrik website. I want to simplify and reduce the size of the graph to speed up queries (eventually I'll run it on whole US). I'm only concerned about the road type tags, so I want to get rid of all the other extraneous information. When using the command line tool osmfilter, I think I was losing some required information with my query.

So I am now trying QGIS, so I can visually see what's happening. I uploaded my data and got five layers. I unchecked everything except the lines layer and the points layer (since those are the ones with the highway tag). How can I export these two layers back into an .osm file to continue my analysis? I have version 3.32.3.

5
  • 1
    OSGEO ogr vector drivers do not allow you to write OSM files so QGIS is not going to help you there. gdal.org/drivers/vector/index.html. There looks to be some help here though: help.openstreetmap.org/questions/6905/…
    – GBG
    Commented Sep 22, 2023 at 21:51
  • 1
    Save data into GeoJSON and use JOSM for converting GeoJSON into OSM.
    – user30184
    Commented Sep 22, 2023 at 22:04
  • What do you want to do with the data, this seems like a xyproblem.info If your want to extract road info I suggest tu use pgOSM Flex pgosm-flex.com Commented Sep 23, 2023 at 9:55
  • My overall main goal is to extract road info (and speed limit) in a reasonable time frame as I have several million (lat,long) points. Basically right now, I'm trying to make sure that after filtering down my Delaware subset OSM file in QGIS, I'm able to reproduce the results and get the same road type information I was getting before filtering it in QGIS. If I get the same results, then I could apply the filtering on all the OSM Data and put it on a database for querying. Commented Sep 24, 2023 at 3:39
  • @user30184 I saved it as GeoJSON then converted it to OSM with JOSM. But then it seems the graph has no edges? Commented Sep 25, 2023 at 20:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.