More stable datatypes, writing nullvals, and type testing#71
Merged
karimbahgat merged 4 commits intoGeospatialPython:masterfrom Sep 24, 2016
karimbahgat:dtypes-nullvals,-take2
Merged
More stable datatypes, writing nullvals, and type testing#71karimbahgat merged 4 commits intoGeospatialPython:masterfrom karimbahgat:dtypes-nullvals,-take2
karimbahgat merged 4 commits intoGeospatialPython:masterfrom
karimbahgat:dtypes-nullvals,-take2
Conversation
Sync with geospatialpython master
Added read and write support for dbf float fieldtype. Date type now also returns and writes datetime.date objects, and can also write a list of yr,month,day for backward compat. Previously "N" numeric was the only supported number type, sometimes resulting in strange string nrs and subsequent saving errors. Also enabled writing QGIS nullvalues, previously only when reading.
This was referenced Sep 24, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added float datatype.
More fully implemented date type by returning and writing datetime.date objects, as well as a list for backwards compat, somewhat similar to #18.
Fixed old boolean reading bug.
Added writing of null values for all types.
Date and boolean fields have predecided size, so user shouldn't be able to change those internals, so autosets size and decimal.
No new doctest failures, only the ones that will be fixed with #68.
Also created some basic tests for all the datatypes (which also works and loads correctly in QGIS, though QGIS seems to treat boolean as string) but wanted to avoid cluttering the lib with additional files. So thought it would be better if someone could use the test code and implement it correctly according to existing pyshp test conventions. Here is the test code: