Ticket #1761 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

CSV driver: Date, Time, DateTime added - patch

Reported by: neteler Assigned to: 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 (1.9 kB) - added by neteler on 08/23/07 09:04:54.
CSV driver extension for Date,Time,DateTime?

Change History

08/23/07 09:04:54 changed by neteler

  • attachment ogr_csv_datetime.patch added.

CSV driver extension for Date,Time,DateTime?

08/23/07 09:11:04 changed by warmerdam

  • cc set to warmerdam.
  • keywords set to csv.
  • 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?

09/10/07 09:32:17 changed 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

09/17/07 11:41:26 changed 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.

09/17/07 11:43:37 changed by mloskot

  • milestone changed from 1.5.0 to 1.4.3.

09/17/07 13:54:37 changed by mloskot

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

09/17/07 14:53:22 changed by mloskot

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

09/24/07 04:27:11 changed by neteler

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

Closing & thanks! Markus