I also confirm the error with today's master (3.8.0dev).
Jukka is correct (same thinking as me), this works directly from CSV
(into PostgreSQL 15.3) now...
ogr2ogr -f "PG:dbname=nz_address port=xxx user=xxx password=xxx"
nz-addresses.csv -oo GEOM_POSSIBLE_NAMES=WKT
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/
On 2023-07-12 8:58 a.m., Rahkonen Jukka wrote:
Hi,
I can confirm the error with GDAL 3.7.0. But because you have both .csv and .csvt it I
wonder if there is any need to use .vrt. Output from "ogrinfo nz-addresses.csv"
looks correct to me.
-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Gary Turner
Lähetetty: keskiviikko 12. heinäkuuta 2023 4.36
Vastaanottaja: Even Rouault <even.roua...@spatialys.com>;
gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] ogrinfo Unable to identify source geometry field with GDAL
3.7 but not 3.3?
As attached. I've removed some bulky documentation from the
as-downloaded/supplied zip file.
On 11/07/2023 8:20 pm, Even Rouault wrote:
Gary,
please provide a VRT and CSV that can reproduce this
Even
Le 11/07/2023 à 03:55, Gary Turner a écrit :
Hi,
Apologies if this isn't the right place to ask, but I am struggling
to work out what's going on.
I'm setting up a new windows machine to process address data provided
by a local agency. I've downloaded new versions of software.
I use ogr2ogr to load csv files via a vrt file into postgres. This
works fine with my old setup, and has worked with various older
versions as well.
However with the latest ogr2ogr it fails. ogrinfo --version says GDAL
3.7.0, released 2023/05/02
P:\bin\gdal37>.\ogrinfo.exe C:\temp\addresses.vrt
INFO: Open of `C:\temp\addresses.vrt'
using driver `OGR_VRT' successful.
1: addressesERROR 1: Unable to identify source geometry field 'WKT'
for geometry.
(None)
but with an older version GDAL 3.3.1, released 2021/06/28
P:\bin\gdal33>.\ogrinfo.exe C:\temp\addresses.vrt
INFO: Open of `C:\temp\addresses.vrt'
using driver `OGR_VRT' successful.
1: addresses (Point)
I get the same failure with ogr2ogr, but ogrinfo seemed simpler and
there's a much less complicated command-line.
I've cut this down to a one-field, one-line of csv example that does
the same thing, if that's useful.
Is this expected?
Is there an easy work-around, that would work with both versions?
Please let me know if I'm missing something obvious or just being
dumb, or should ask elsewhere.
Thanks
Gary
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev