2

I downloaded Switzerland OSM data from Geofabrik.de at https://download.geofabrik.de/europe/switzerland.html especially the switzerland-latest-free.shp.zip file.

The MD5 sum corresponds to what's specified (293b013ec4d5574cbe3dad703f18acdf).

But after extracting the files, when I load a Shapefile, e.g. in QGIS, it shows an empty attribute table:

enter image description here

Did I miss something there? Do I need to preprocess the file in some way to make the features visible?

EDIT: same thing happens if I try to load the Shapefile with geopandas:

>>> import geopandas as gpd
>>> gdf = gpd.open('./switzerland-latest-free.shp/gis_osm_pois_a_free_1.shp')

>>> gdf
Empty GeoDataFrame
Columns: [geometry]
Index: []
1
  • 3
    I did check the data and there is a problem with this Switzerland data extract (I get the same result as you : the shapefile load in QGIS but with 0 feature...) other country work as expected. You may try later after geofabrik update the data or look for another source...
    – J.R
    Sep 7, 2022 at 10:15

1 Answer 1

5

Many of the shapefiles from that download are empty. The .shp files are 100 bytes long, which is basically just the shapefile header. There are large .shp files in that download but they don't have a .shx file to go with them. They also report zero features with ogrinfo.

I just tried Liechtenstein as a comparison and that looked okay, so something is wrong with Switzerland.

Checked the GeoFabrik twitter account and there's the answer:

https://twitter.com/geofabrik/status/1566763301350014977?s=20&t=s31oYR4bdzOstiYDDYFMkA

"Some of our free shape files on http://download.geofabrik.de were tripped up by the unexpected appearance of https://openstreetmap.org/node/10000000000 (DBF field width for osm_id: 10)... fix being deployed."

2
  • Ah thanks for that piece of information. Hopefully it will get fixed soon. Sep 7, 2022 at 11:05
  • The issue seems to be fixed now. Btw, the number of nodes in OSM reached a nice amount... ;) Sep 7, 2022 at 20:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.