[gdal-dev] Problem writing with ODS and XLSX drivers
Jeff McKenna
jmckenna at gatewaygeomatics.com
Sat Sep 12 13:14:36 PDT 2020
Hi Hernán,
Interesting results here with your file test.shp, on Windows, through
ogr2ogr:
- GDAL 2.4.4, expat 2.2.9 -> success (looks good with LibreOffice
7.0.0.3)
- GDAL 3.1.3, expat 2.2.9 -> corrupt (LibreOffice says file is
corrupt, cannot be opened)
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/
On 2020-09-12 4:18 p.m., Hernán De Angelis wrote:
> Even and all,
>
> Thank you all for your kind help with this. The two test datasets can be
> found here:
>
> https://geonatura.se/test.zip
>
> https://geonatura.se/se_100km.zip
>
> Both files are open data and can be used and shared. "Test.zip" is a
> subset of the Swedish registry of environmental monitoring stations
> (bathing water). It's attribute table contains a lot of Swedish names.
> Encoding is UTF-8. The other is a dataset distributed by the European
> Environmental Agency containing a 100x100 km grid for Sweden. No unusual
> characters there.
>
> For both datasets the ogr command is:
>
> ogr2ogr -f ODS test.ods test.shp test
>
> and
>
> ogr2ogr -f ODS se_100km.ods se_100km.shp se_100km
>
> Note that exporting to CSV using ogr2ogr works like charm.
>
> Thanks again!
>
> /Hernán
>
> On 2020-09-12 20:00, Even Rouault wrote:
>>
>> On samedi 12 septembre 2020 17:20:29 CEST Hern�n De Angelis wrote:
>>
>> > Hi everyone
>>
>> >
>>
>> > I am experiencing an odd and stubborn problem when trying to export
>>
>> > attribute tables from both shp and spatialite to ods or xlsx. ogr2ogr
>>
>> > finishes work silently with no reported errors but the generated output
>>
>> > files cannot be opened with Libreoffice, which says the file is
>>
>> > corrupted and is even unable to repair it.
>>
>> >
>>
>> > The input files are good from what I can see using QGIS and OGR but it
>>
>> > is clear that something isn't right in my installation, my procedure or
>>
>> > somewhere else. I am missing something? Have other users experienced
>> this?
>>
>> Please share minimal ods/xlsx files that can be used to reproduce the
>> issue (and possibly source datasets + ogr2ogr invokation used to
>> generate the ods/xlsx files)
>>
>> Even
>>
>> --
>>
>> Spatialys - Geospatial professional services
>>
>> http://www.spatialys.com
>>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
More information about the gdal-dev
mailing list