Python – esy-OSMfilter error when trying to work through the example – OSM_raw_data does not exist

  openstreetmap, osm.pbf, python, windows

I am getting the following error when trying to go through the esy-osm example:

INFO:esy.osmfilter.pre_filter:OSM_raw_data does not exist

I am using python 3.8 on Windows and the code I am using is below:

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_dataOSM_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']))

Does anyone know where I am going wrong on this?

Source: Windows Questions

One Reply to “Python – esy-OSMfilter error when trying to work through the example – OSM_raw_data does not exist”

LEAVE A COMMENT