Hello,

i am importing an xml with ogr2ogr using GMLAS driver to a PostgreSQL server. I 
am also using an .xsd file to correctly import and manage the imported xml in 
the server. This way i was able to import every element into the correct column 
based on the xsd, except one, a type="xsd:time" element. In the server i 
created a table list and their columns with types based on the xsd, but this 
"Uhrzeit" element's value wont get imported into the server. I checked the type 
in PostgreSQL, which is "time without time zone".
The value in the xml is HH:MM:SS formated so in theory it should work, but it 
wont.
My question is: what adjustments can i do with my ogr2ogr command
ogr2ogr_command = [
        'ogr2ogr', '-skipfailures', '-f', 'PostgreSQL', f'PG:host={host} 
port={port} dbname={dbname} password={password} user={user} schemas={schema}',
        f'GMLAS:{xml_file_path}',
        '-oo', f'XSD={xsd_file_path}',
        '-oo', 'REMOVE_UNUSED_LAYERS=YES', '-oo', 'REMOVE_UNUSED_FIELDS=YES', 
'-append', '-forceNullable'
    ]
to be able to import this type of data too?

I hope i am sending my question to the right person. If this is not the case, 
kindly disregard my message.

Best regards,
Bence
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to