Ticket #1761 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

CSV driver: Date, Time, DateTime added - patch

Reported by: neteler Owned by: mloskot
Priority: normal Milestone: 1.4.3
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: csv
Cc: warmerdam

Description

Frank,

I have extended the OGR-CSV driver to support also Date, Time, DateTime? via .csvt file.

cat RR_LOCID000140.csv
SOUID,DATE,RR,Q_RR
...
916090,2007-05-31,0,0

cat RR_LOCID000140.csvt
"Integer","Date","Real","Integer"

ogrinfo  RR_LOCID000140.csv  RR_LOCID000140
...
OGRFeature(RR_LOCID000140):20605
  SOUID (Integer) = 916090
  DATE (Date) = 2007/05/31
  RR (Real) = 0
  Q_RR (Integer) = 0

Works. Also tested with db.in.ogr of GRASS (which calls v.in.ogr).

The rather trivial patch attached including extended documentation.

Best, Markus

Attachments

ogr_csv_datetime.patch Download (1.9 KB) - added by neteler 4 years ago.
CSV driver extension for Date,Time,DateTime?

Change History

Changed 4 years ago by neteler

CSV driver extension for Date,Time,DateTime?

Changed 4 years ago by warmerdam

  • cc warmerdam added
  • keywords csv added
  • component changed from default to OGR_SF
  • owner changed from warmerdam to mloskot
  • milestone set to 1.5.0

Mateusz,

Could you integrate this in trunk, and add some appropriate test suite tests for the new features in gdalautotest/ogr/ogr_csv.py?

Changed 4 years ago by neteler

Hi Mateusz,

would you mind to apply this path? Sorry for bothering... If you need any test data, please let me know.

thanks, Markus

Changed 4 years ago by mloskot

  • status changed from new to assigned

Markus, sorry you've been waiting for the fix so long. This is to be tested and fixed today.

Changed 4 years ago by mloskot

  • milestone changed from 1.5.0 to 1.4.3

Changed 4 years ago by mloskot

The patch has been applied to the SVN trunk (r12174).

Changed 4 years ago by mloskot

Also backported to branches/1.4 targeting 1.4.3 release (r12175)

Changed 4 years ago by neteler

  • status changed from assigned to closed
  • resolution set to fixed

Closing & thanks! Markus

Note: See TracTickets for help on using tickets.