[Qgis-user] multiple csv file import

Even Rouault even.rouault at spatialys.com
Tue Nov 15 12:09:45 PST 2022


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, 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 process the lat lon columns with postgis.
>
>  Are there arguments for ogr2ogr that can do this?
>
> On Tue, Nov 15, 2022 at 12:30 PM David Strip via Qgis-user 
> <qgis-user at lists.osgeo.org> wrote:
>
>     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.
>
>     On 11/15/2022 9:59 AM, Salvatore Mellino via Qgis-user wrote:
>>     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 in
>>>     the format of your choice. You may need to convert the
>>>     coordinates in decimal degrees (ex 75 05 30.4 ->
>>>     75.0917777777778000000 ).
>>>
>>>     You can do this in Excel using =(A6)+(B6/60)+(C6/3600)+(D6/3600)
>>>     A= Deg, B= Min, C=Sec, D= Decimal Sec.  Then export to csv.
>>>
>>>     Nicolas
>>>
>>>
>>>     On 2022-11-15 10:08 a.m., Salvatore Mellino via Qgis-user wrote:
>>>>     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
>>>>
>
>
>     _______________________________________________
>     Qgis-user mailing list
>     Qgis-user at lists.osgeo.org
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> -- 
> Hugh Kelley
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221115/f52da61f/attachment.htm>


More information about the Qgis-user mailing list