尝试查看esy-osm example时出现以下错误
INFO:esy.osmfilter.pre_filter:OSM_raw_data does not exist我在Windows上使用python 3.8,我使用的代码如下:
import os, sys
import configparser, contextlib
from esy.osmfilter import osm_colors as cc
from esy.osmfilter import run_filter
from esy.osmfilter import Node, Way, Relation
PBF_inputfile = os.path.join(os.getcwd(), 'Geospatial_data\OSM_raw/liechtenstein-latest.osm.pbf')
JSON_outputfile = os.path.join(os.getcwd(), 'Geospatial_data/OSM_filtered/liechtenstein.json')
prefilter = {Node: {}, Way: {"man_made":["pipeline",],}, Relation: {}}
whitefilter = []
blackfilter = []
[Data,_]=run_filter('noname',
PBF_inputfile,
JSON_outputfile,
prefilter,
whitefilter,
blackfilter,
NewPreFilterData=True,
CreateElements=False,
LoadElements=False,
verbose=True)
print(len(Data['Node']))
print(len(Data['Relation']))
print(len(Data['Way']))有人知道我在这一点上哪里错了吗?
发布于 2020-12-03 21:48:33
您找不到pbf文件。
请查看您机器上的路径分隔符。对于windows,它是‘\’,对于unix,它是‘/’。
这两种用法都用得很像:'Geospatial_data\OSM_raw/liechtenstein-latest.osm.pbf‘
干杯,亚当
https://stackoverflow.com/questions/65068084
复制相似问题