简体   繁体   中英

Reading datasets for geopandas

I trying reads data for dataset with help of geopandas, but interpreter wright:

File "/home/divinitytoffee/PycharmProjects/Radar/venv/lib/python3.5/site-packages/geopandas/datasets/ init .py", line 33, in get_path raise alueError(msg) ValueError: The dataset 'resource/RAVL_vLuki/rd0a0h.00d' is not available

import geopandas as gpd
import fiona.ogrext
import pandas as pd

gpd_data = gpd.gpd.read_file(gpd.datasets.get_path('resource/RAVL_vLuki/rd0a0h.00d'))

Actually the question, how to fix? Data are presented in the form of a *.00d

The geopandas.datasets.get_path is meant to return the path of a few datasets that are included in the geopandas library itself (eg for examples).

When reading your own file, you need to pass the path directly to read_file :

gpd_data = gpd.gpd.read_file('resource/RAVL_vLuki/rd0a0h.00d')

Do you want to import it as a data frame?

I don't know if this will help.

import geopandas as gpd
gpd_data = gpd.gpd.GeoDataFrame.from_file('resource/RAVL_vLuki/rd0a0h.00d')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM