NaotoR NaotoR - 6 days ago 5
JSON Question

Unable to open shp file

So, I've been following Mike Bostock's tutorial on creating a map.

To create the

subunits.json
GeoJSON file using
ogr2ogr
and
ne_10m_admin_0_map_subunits.shp
(which is the input) I typed:

ogr2ogr \
-f GeoJSON \
-where "ADM0_A3 IN ('GBR', 'IRL')" \
subunits.json \
ne_10m_admin_0_map_subunits.shp


but then I get:

Unable to open datasource 'ne_10m_admin_0_map_subunits.shp' with the following drivers.


I have qgis on my laptop and I though qgis would do the jack, but I guess not :P
Does anyone have an idea how to fix it??

Answer

A typical source of this error seems to be simply not being in the directory where you unzipped the file. Navigate to wherever you unzipped the downloaded files via terminal and run the command there.

Comments