-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: There are no KML files to load from the base directory with this filter #3
Comments
Hi, Anyway Great plugin! One small suggestion: the configuration "sort loaded layers by name" doesn't work propperly for numbers in the directory names. An extra question: Is there a way to export all the files back to the original folder pathway? In my case I imported a big batch of KML files in WGS84 and wat to export them to the source maps in a .shp with a different CRS (Lambert1972 EPSG31370) |
Hi @boomvalk, thanks for raising these issues.
Regarding the batch export functionality, unfortunately I have no spare time these days to spend on it, but it should be certainly possible. I'll keep you informed when these issues are solved. Regards, Germán |
Hi Germán, I did the batch export with a Python script. It doesn't yet save
the files to the correct directories yet but for now I am helped a great
deal with your plugin as it is now.
Many thanks for you great plugin!
from qgis.core import *
import os
pathToFile = "S:\\Meetnetten\\Amfibieen en
reptielen\\Vuursalamander\\Transecten 2016\\"
trs = QgsCoordinateReferenceSystem()
trs.createFromId(31370)
suffix = "_Lambert1972_Versie2016-01-04"
prefix = "Transect_Vuursalamander_"
layers = iface.legendInterface().layers()
for layer in layers:
newName = prefix + layer.name() + suffix + ".shp"
ret = QgsVectorFileWriter.writeAsVectorFormat(layer,pathToFile +
newName,'utf-8',trs,'ESRI Shapefile')
if ret == QgsVectorFileWriter.NoError:
print newName + " saved to " + pathToFile + "!"
|
Always use os.path to deal with paths. To save each layer in its corresponding folder, you could extract its folder with: and then, set the path to the new layer as:
|
Hi,
When I try the Load Them All plugin, select a map containing two sub maps each containing a KML file I always get the error: "There are no shp, mif, tab, kml, ... files to load fromt he base directory with this filter. Change those parameters and try again"
This is odd since I have turned off all filters and the maps contain nothing but the KML files I wish to upload. I tried it with all boxes unchecked in configuration, tried it in a new empty project as well as an existing one, rebooted my QGIS, tried with "all listed formats" as well as ".kml". Everything try results in the same error.
When I try the plugin for a different map structure containing .shp files everything works like a charm.
Can someone please help? Im on QGIS 2.14.2 on a windows 7
The text was updated successfully, but these errors were encountered: