I want to open multiple GeoJSON files, each have Points and LineStrings - I only want the LineStrings. I want to open potentially 1000s of files so don't want the popup asking if I want Points or LineStrings each time. Is there a tool I can use?

1 Answer 1


You could convert them into GeoJSON files with just the LineStrings and then open them.

For example on windows using ogr2ogr in the folder (assuming the files end in .geojson, and new files will be called file_line.geojson):

for /R %f in (*.geojson) do ogr2ogr -f "GeoJSON" "%~dpnf_line.geojson" "%f" -where "OGR_GEOMETRY='LineString'"

Then you can load them into QGIS without prompts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.