Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export layer with Boolean field results in Integer field #57359

Closed
2 tasks done
meyerlor opened this issue May 7, 2024 · 5 comments · Fixed by OSGeo/gdal#9876
Closed
2 tasks done

Export layer with Boolean field results in Integer field #57359

meyerlor opened this issue May 7, 2024 · 5 comments · Fixed by OSGeo/gdal#9876
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@meyerlor
Copy link

meyerlor commented May 7, 2024

What is the bug or the crash?

I refactored a layer, the resulting layer has a field of the type "boolean" - when i export this layer as .shp or MapInfo .tab the boolean field shows up as a Integer field.

Refactored memory layer:
grafik

Export options:
grafik

Resulting layer:
grafik

Steps to reproduce the issue

1.Have a layer with boolean field
2. Export layer
3. Open layer -> boolean field is Integer or String

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.36.1-Maidenhead QGIS code revision 3e58945
Qt version 5.15.13
Python version 3.12.3
GDAL/OGR version 3.8.5
PROJ version 9.4.0
EPSG Registry database version v11.004 (2024-02-24)
GEOS version 3.12.1-CAPI-1.18.1
SQLite version 3.45.1
PDAL version 2.6.3
PostgreSQL client version 16.2
SpatiaLite version 5.1.0
QWT version 6.2.0
QScintilla2 version 2.14.1
OS version Windows 10 Version 2009
       
Active Python plugins
autoSaver 2.9
lizmap 4.3.11
PluginLoadTimes 4.0.2
processing_saga_nextgen 1.0.0
qfieldsync v4.9.1
simplesvg 3.0.3
slyr 7.3.0
db_manager 0.1.20
processing 2.12.99
QGIS version 3.36.1-Maidenhead QGIS code revision [3e58945](https://github.com/qgis/QGIS/commit/3e589453) Qt version 5.15.13 Python version 3.12.3 GDAL/OGR version 3.8.5 PROJ version 9.4.0 EPSG Registry database version v11.004 (2024-02-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.45.1 PDAL version 2.6.3 PostgreSQL client version 16.2 SpatiaLite version 5.1.0 QWT version 6.2.0 QScintilla2 version 2.14.1 OS version Windows 10 Version 2009

Active Python plugins
autoSaver
2.9
lizmap
4.3.11
PluginLoadTimes
4.0.2
processing_saga_nextgen
1.0.0
qfieldsync
v4.9.1
simplesvg
3.0.3
slyr
7.3.0
db_manager
0.1.20
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@meyerlor meyerlor added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 7, 2024
@nicogodet
Copy link
Member

This is not a bug. ESRI Shapefile does not support boolean field type (boolean are converted to integer by QGIS on save).
Switch to Geopackage if you want boolean field.

@nicogodet nicogodet closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
@meyerlor
Copy link
Author

meyerlor commented May 7, 2024

@nicogodet MapInfo supports boolean though, and the same happens when exporting to MapInfo

@nicogodet nicogodet reopened this May 7, 2024
@rouault
Copy link
Contributor

rouault commented May 7, 2024

ESRI Shapefile does not support boolean field type

actually they do (at least DBF supports it. Support for it in ESRI software itself is half convincing). Support added for that in the ESRI Shapefile driver of GDAL 3.9

MapInfo supports boolean though, and the same happens when exporting to MapInfo

@meyerlor Could you attacha MapInfo dataset with a boolean field? Ideally both a .mid/.mif and a .tab/.dat/.map

@meyerlor
Copy link
Author

meyerlor commented May 8, 2024

@rouault sure thing:
MapInfo_Trees_Logical.zip
The field "Kronensicherung" is a field of type "logical"

@nicogodet nicogodet added the Data Provider Related to specific vector, raster or mesh data providers label May 8, 2024
rouault added a commit to rouault/gdal that referenced this issue May 8, 2024
rouault added a commit to rouault/gdal that referenced this issue May 8, 2024
rouault added a commit to rouault/gdal that referenced this issue May 8, 2024
@nyalldawson
Copy link
Collaborator

Closing as an upstream (gdal) issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
4 participants