[gdal-dev] RFC 21: OGR SQL type cast and field name alias

Tamas Szekeres szekerest at gmail.com
Fri Jan 25 16:04:17 EST 2008


2008/1/25, Frank Warmerdam <warmerdam at pobox.com>:
> What other types are supportted when casting fields via your new mechanism?
> I'd like to see the RFC explain how each of the OGR field types would
> be represented in these cast directives.
>

Frank,

I consider converting to string, float, and integer makes sense with
the OGR field types. I've descibed this option in the proposal using
the SQL pseudo syntax description:

<data type> ::= character [ ( field_length ) ]
                | float [ ( field_length ) ]
                | integer [ ( field_length ) ]
Should I add more description about this topic in the RFC?

SQL92 specifies some additional types like datetime for example.
However in case of the datetime type GetFieldAsDatetime doesn't really
support using other than the datetime as the source type so it doesn't
really support type conversion.

>
> BTW, I didn't notice any test scripts in the proposed patch.  That would
> also be needed though I'd be willing to write the tests for the new feature
> if you like.
>

I'm indeed not an expert in writing python scripts, therefore I would
really appreciate if you were help me out. I can update the RFC
accordingly.
I'm using ogrinfo and ogr2ogr for making the SQL specific tests in my side.


Best regards,

Tamas


More information about the gdal-dev mailing list