-
Notifications
You must be signed in to change notification settings - Fork 213
Add support for milliseconds #893
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
Closed
rbuffat
wants to merge
18
commits into
Toblerity:maint-1.8
from
rbuffat:add_support_for_milliseconds
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
11f7b11
implement supÃport for milliseconds, refactor test_datetime
rbuffat 4739efb
cleanup
rbuffat 315bf51
enable datetime tests also for GPX, GPSTracker and GML, refactor warn…
rbuffat 52410a9
fix test for gpx/GPSTrackMaker
rbuffat 4c8a753
generalize unsupported field types check
rbuffat e82a068
speficy field_types in driver_converts_field_type_silently_to_str
rbuffat a28961d
refactor set_field_datetime and get_field_as_datetime
rbuffat 5e06fb0
Merge branch 'maint-1.8' into add_support_for_milliseconds
rbuffat 01de3de
cleanup
rbuffat 365c991
remove comma
rbuffat b621c1c
more cleanup
rbuffat 908c603
refactor driver_converts_field_type_silently_to_str
rbuffat d37f897
add test for driver_converts_to_str
rbuffat 5c2337f
take driver write capabilities into account
rbuffat a01f9bf
take into account if field is supported by driver
rbuffat 6e81c96
extend tests to include drivers that convert to string
rbuffat 0663327
gdal implemented support for None time fields with https://github.com…
rbuffat d258107
keep old tests
rbuffat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ cdef extern from "ogr_srs_api.h" nogil: | |
| void OSRSetPROJSearchPaths(const char *const *papszPaths) | ||
|
|
||
|
|
||
| from fiona.ogrext2 cimport * | ||
| from fiona.ogrext3 cimport * | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unrelated to this PR and should be changed anyhow. |
||
| from fiona._err cimport exc_wrap_pointer | ||
| from fiona._err import cpl_errs, CPLE_BaseError, FionaNullPointerError | ||
| from fiona.errors import DriverError | ||
|
|
@@ -167,3 +167,22 @@ cdef (int, int, int) get_proj_version(): | |
| cdef int patch | ||
| OSRGetPROJVersion(&major, &minor, &patch) | ||
| return (major, minor, patch) | ||
|
|
||
|
|
||
| cdef void set_field_datetime(void *cogr_feature, int iField, int nYear, int nMonth, int nDay, int nHour, int nMinute, float fSecond, int nTZFlag): | ||
| OGR_F_SetFieldDateTimeEx(cogr_feature, iField, nYear, nMonth, nDay, nHour, nMinute, fSecond, nTZFlag) | ||
|
|
||
|
|
||
| cdef (int, int, int, int, int, int, float, int) get_field_as_datetime(void *cogr_feature, int iField): | ||
| cdef int retval | ||
| cdef int nYear = 0 | ||
| cdef int nMonth = 0 | ||
| cdef int nDay = 0 | ||
| cdef int nHour = 0 | ||
| cdef int nMinute = 0 | ||
| cdef float fSecond = 0.0 | ||
| cdef int nTZFlag = 0 | ||
|
|
||
| retval = OGR_F_GetFieldAsDateTimeEx(cogr_feature, iField, &nYear, &nMonth, &nDay, &nHour, &nMinute, &fSecond, &nTZFlag) | ||
|
|
||
| return (retval, nYear, nMonth, nDay, nHour, nMinute, fSecond, nTZFlag) | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.