Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Salvatore Mellino via Qgis-user
I found this on line : import glob, os # Define path to directory of your csv files path_to_csv = "C:/File Path/" # Set current directory to path of csv files os.chdir(path_to_csv) # Find each .csv file and load them as vector layers for fname in glob.glob("*.csv"): uri

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Hugh Kelley via Qgis-user
Awesome thanks very much. glad I asked, you learn something new every day. On Tue, Nov 15, 2022 at 3:19 PM David Strip wrote: > Starting with v2.1, ogr2ogr supports args X_POSSIBLE_NAMES, > Y_POSSIBLE_NAMES which are strings with allowed wildcards (eg, Lon* ), or > you can use field_1, field_2,

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread David Strip via Qgis-user
Starting with v2.1, ogr2ogr supports args X_POSSIBLE_NAMES, Y_POSSIBLE_NAMES which are strings with allowed wildcards (eg, Lon* ), or you can use field_1, field_2, etc to explicitly give the position of lat/lon. It's explained on the driver page.  This

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Even Rouault via Qgis-user
See the X_POSSIBLE_NAMES and Y_POSSIBLE_NAMES open options of the CSV driver mentioned at https://gdal.org/drivers/vector/csv.html#open-options and the last example of https://gdal.org/drivers/vector/csv.html#examples Even Le 15/11/2022 à 20:58, Hugh Kelley via Qgis-user a écrit : David,

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Mike Hyslop via Qgis-user
This has been covered in StackExchange: https://gis.stackexchange.com/questions/276590/bulk-csv-to-shapefile-using-ogr2ogr Determine the correct ogr2ogr syntax for processing one of your .csv files. If on Windows, issue the command *ls *.csv > files.txt*This will 'list' all of your csv files

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Hugh Kelley via Qgis-user
David, this was my first thought when i saw this question as well. however, I didn't look for very long but I haven't seen a way to tell ogr2ogr to read columns in a csv as the lat/lon and write those as points to the shapefile. I generally write a csv to postgres as a non-spatial table and then

[QGIS-it-user] QGIS senza GIS

2022-11-15 Thread Amedeo Fadini
Ciao a tutti finché lo ripeteva Stefano Campus ho sempre ritenuto sempre una boiata l'idea di usare QGIS per dati e reportistica senza componente spaziale. Oggi però ho cambiato idea. Ho rimesso le mani per l'ennesima volta in un gestionale in access che ho fatto per stampare le mie fatture

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Salvatore Mellino via Qgis-user
Hello, thank you for your suggestion. I am not comfortable with python, but I know that is possible to use a script in qgis. Is there any script capable to do my issue? > Il giorno 15 nov 2022, alle ore 18:29, David Strip > ha scritto: > >  You might consider ogr2ogr as an alternative

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread David Strip via Qgis-user
You might consider ogr2ogr as an alternative approach. You can run this from the command line allowing you to use shell scripts to iterate through all your .csv files. There are also python bindings for ogr2ogr if you're more comfortable with python than shell scripts.

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Salvatore Mellino via Qgis-user
Hello, thank you for your answer. I have many csv (about 100), so I need an automatic procedure. Maybe a python script... Il 15/11/2022 16:55, Nicolas Cadieux ha scritto: Hi, Yes, you can do that very easily using QGIS.  Layer/add layer/add delimited text layer.  Then just export the layer

Re: [Qgis-user] multiple csv file import

2022-11-15 Thread Nicolas Cadieux via Qgis-user
Hi, Yes, you can do that very easily using QGIS.  Layer/add layer/add delimited text layer.  Then just export the layer in the format of your choice. You may need to convert the coordinates in decimal degrees (ex 75 05 30.4 -> 75.0917800 ). You can do this in Excel using

[Qgis-user] multiple csv file import

2022-11-15 Thread Salvatore Mellino via Qgis-user
Hello, I would like to know if it is possible to import multiple csv files contained in a folder and to convert them in shapefiles (1 for each csv). All csv files are structured as "lat long value" separate by space and without any header line. Thank you for your help! Regards, Salvatore

Re: [Qgis-user] project browser very, very slow

2022-11-15 Thread Micha Silver via Qgis-user
I recall that on a networked Windows machine it helped tremendously to "Hide from Browser" all those network shares that are not relevant to QGIS. There's a "Hide" option when you "right click" on any folder in the browser pane. Maybe that will

[Qgis-user] Graphical Modeler to add same datasource multiple times with different styles

2022-11-15 Thread Seggie, Graeme via Qgis-user
PUBLIC Hello, I am trying to use the graphical modeller to do something which seems simple but will help users set up a map quickly based on refreshed data and existing styles. Basically, add the same geopackage source to map and style using the algorithm 'Load layer into project' then style