-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
OGR corrupts dbase IV files #2486
Comments
Does "." stand for a NULL attribute? |
dbase IV knows no NULL, NULL got implemented with dbase VII, |
What I was remembering is that the field in .dbf may be born as totally empty. |
the problem occurs only in float fields which are empty |
Somehow seems that dbase IV is initializing the field with plain "." |
yeah, that is what should happen. |
I don't think we really care about the original dBase IV program... I'd say that if there's no interoperability problem with current ESRI tools that deal with Shapefiles, which is the reason for DBF support in GDAL, then doing nothing is probably the best action. |
The problem is that programs use the dBase iv standard and not some pseudo standard.
Arcgis is dealing with it correct, the dbf that comes out of arcgis is not changing the values. |
which ones ?
Can you attach a DBF created by ArcGIS with NULL value in a floating point field ? |
ESRI products do read without problems shapefiles written with GDAL so the interoperability problems must be mostly outside the pure GIS scope. I do not mean that the problem that you have is not real and annoying for you. What are those other programs which are crashing BTW? |
Pcgeofim, a program that let's you simulate and calculate groundwater for input areas.
I can post it tomorrow, when I'm back at work. Edit: |
Could you tell how to create a shapefile with null floating point values with ArcMap 10.8? I tried by creating a new shapefile and digitizing a few points but ArcMap automatically writes value 0.000000000e+00 into the field. Should I update the value into NULL with Python or something? With GDAL I could update values into nulls with Dbf file has now lots of stars ****. If I open this shapefile with ArcMap, which succeeds without errors, and save the layer as a new copy it turns the row of stars into 0.0000000000. OpenJUMP is also saving floating point values that I have not edited into shapefile by using zeroes with lots of decimals: 0.00000000. Should I understand that ESRI and OpenJUMP developers have been thinking that shapefile does not even support NULL as a value of a numeric field? |
dBase IV is not supporting NULL. Can you check the version that is used for your dbf file? |
So, there's no specific way with ArcMap to have a dedicated NULL value in a floating-point field ? AFAICS, the current behaviour of GDAL / shapelib dates back to the very first GDAL release from 2001 : https://github.com/OSGeo/gdal/blob/v1.1.5/ogr/ogrsf_frmts/shape/dbfopen.c#L968 |
Right. ESRI is storing either -1.7976931348623158e+308 or zero to represent NULL. Data Type containing null value - Shapefile representation Number (all other geoprocessing tools) I wonder it they have been thinking that values which mean NULL should be something else than the uninitilized value of dfb field. http://independent-software.com/dbase-dbf-dbt-file-format.html
I could find from the history the Jim Matthews is behind the allstars solution in shapelib version 1.2.9 http://shapelib.maptools.org/release.html but not the background about where the stars appeared. Later also Geotools adopted this feature https://osgeo-org.atlassian.net/browse/GEOT-5617. I don't really see this as a bug. |
ArcMap, GDAL and OpenJUMP are creating .dbf with "0x03" as file type byte which means "FoxBASE+/Dbase III plus, no memo". |
Expected behavior and actual behavior.
Expected:
Actual:
This is after editing the file via QGIS with the "ogr" driver
The problem seems to be related to the dbase IV and dbase VII format of the used file.
Steps to reproduce the problem.
Operating system
Windows10 64Bit
QGIS 3.12.2
GDAL version and provenance
Compiled against GDAL/OGR 3.0.4
The text was updated successfully, but these errors were encountered: