[Geoserver-devel] Logical (Boolean) data type in shapefiles

Hi,

I was reading this http://jira.codehaus.org/browse/GEOT-2689 about shapefiles which has value “?” in a field of type Logical and then with poor success this

http://www.javadocexamples.com/java_source/org/geotools/data/shapefile/ShapefileDataStore.java.html

I would like to know how Geotools is interpreting Logical field which contains “?”.

By reading this http://www.clicketyclick.dk/databases/xbase/format/data_types.html ? should mean Not initialised (default) (NULL). As mentioned, some sources tell that space 0x20 is used to mean NULL http://dbase.com/Knowledgebase/INT/db7_file_fmt.htm

Some sources seem to use “initialized” and some others “not initialized” in a meaning of “default, NULL”. For me the correct behavior might be

In reading:

? or space → NULL

Y, y, T, t → TRUE

N, n, F, f → FALSE

In writing:

NULL → ?

TRUE → T

FALSE → F

-Jukka Rahkonen-