Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set SHAPE_RESTORE_SHX config option to YES to restore or create it

I am not able to read the shape file. It says no such working directory. enter image description here

!pip install sentinelsat
!pip install geopandas
!pip install folium
from sentinelsat import SentinelAPI
user = '****' 
password = '****' 
api = SentinelAPI(user, password, 'https://scihub.copernicus.eu/dhus')
import geopandas as gpd
import folium 

nReserve = gpd.read_file(r"G:\New folder (2)\cardinialres.shp")

m = folium.Map([-37.971389,  145.418889], zoom_start=12)
folium.GeoJson(nReserve).add_to(m)
m

''I googled and found that I need to use SHAPE_RESTORE_SHX=YES fio info myshapefile.shp but do not know where to use in Jupiter lab.

like image 390
Nikhil Kumar Macharla Avatar asked Apr 26 '20 07:04

Nikhil Kumar Macharla


2 Answers

All the file which come with .shp file should be in same folder (.shx, .prj, .dbf)

like image 197
Akash Desai Avatar answered Sep 19 '22 03:09

Akash Desai


Fix this issue, after a little more understanding of the .shp objects. The solution is to have all other relevant files that come along with .shp file in one folder!

if you working with the river dataset Ex. river.shp river.prj river.dbf river.shx

like image 36
MD Gazuruddin Avatar answered Sep 20 '22 03:09

MD Gazuruddin