I am using QGIS 3.34.13 on Windows 10. I am relatively new to QGIS.
I am making a map of 4 counties in New York State. I downloaded OSM from Geofabrik, but the smallest I can get is the entire state. So, I started with that. The problem is that it was missing NYC public land, which is quite extensive. Emailed NYC data for shapefile. They agreed to produce and send it. Never got it after 2 mo of waiting. Went back to OSM and downloaded 5 sections through Overpass API. They had everything I wanted. But, the NYC land, NY State land, town boundaries, etc were all mixed into the polygon layer. I duplicated them and decided I would break them out by deleting everything except for the feature desired (NYC public land, NYC permit land, NYC restricted land, and NY State land). The problem is that I cannot toggle on editing (right-click on file or Attribute Table). Cannot delete without clicking on 'Toggle Editing'. So, I am stuck.
Here is how I tried to fix it:
- Checked permission on OSM file in Windows. clicked on write & modify & reloaded;
- Check in QGIS. Read only is NOT checked;
- Redid everything multiple times;
- Checked other files, and I can turn on editing on all non-OSM files, it appears to be an OSM/data provider problem;
- Tried a number of other suggestions.
I just cannot find a way to solve the 'Toggle Editing' blocking problem.
-
1Which datatype you choose from the overpass API? Only GeoJSON or KML can be edited, GPX not.eurojam– eurojam2025年04月15日 05:35:33 +00:00Commented Apr 15 at 5:35
-
1Following @eurojam's remark, you can likely export the OSM data, whatever format it may be, to a GeoPackage (or Shapefile) and the result will be editable.Matt– Matt2025年04月15日 07:37:04 +00:00Commented Apr 15 at 7:37
-
2Next time you might find what you are looking for here: data.gis.ny.govJohn– John2025年04月15日 10:16:32 +00:00Commented Apr 15 at 10:16
-
I am totally confused on how to use OSM & Overpass API to output the file in the appropriate file type, such as, GeoJSON or KML. This is how I generated the original file, which output an XML file: I clicked on Export. Entered the WGS84 coordinates. Clicked on Overpass API. This produced the XML file. I cannot see any place to change or add code to make it a GeoJSON, KML, or Shape file format.MichaelCM– MichaelCM2025年04月17日 12:04:52 +00:00Commented Apr 17 at 12:04
-
For John's response of using: data.gis.ny.gov . NY's data site does have 17 possible downloads of data. We do use it for NYS Wild Forest and Wilderness areas, and park boundaries. But, NY State's site (data.gis.ny.gov) does NOT have NY Cities data. You have to go to data.cityofnewyork.us/… for NYC data sets. What we are looking for is outlined here: nyc.gov/assets/dep/downloads/pdf/recreation/… . There are about 175 shape files we need.MichaelCM– MichaelCM2025年04月17日 12:17:42 +00:00Commented Apr 17 at 12:17
1 Answer 1
Use the "QuickOSM" plugin from the standard QGIS plugin repository.
https://plugins.qgis.org/plugins/QuickOSM/
The plugin gets installed in the "Vector" menu.
Open a suitable basemap or get to your area of interest by any other means.
Open the plugin, then input your query in the "quick query" tab. In my example I use the filter "boundary=administrative" (so key="boundary" and value="administrative") and another (click the plus icon) with key="admin_level" and value="4". You can find your desired key/value combinations using the "identify" tool from the map of the main osm.org website.
Then click on "in", choose "canvas extent", click run and you get editable layers.