Hi,

It is very difficult to create manually the table & field structure that will be generated by the GMLAS driver. It is likely that the attribute name generated by the GMLAs driver is not the one you expect. First try ogr2ogr to a not-yet-existing PotsgreSQL table to see if data is correctly ingested (on a quick try on my side with a very simple example, it is)

Even

Le 26/03/2024 à 11:01, Bence Megyesi via gdal-dev a écrit :
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

--
http://www.spatialys.com
My software is free, but my time generally not.

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

Reply via email to