[Gdal-dev] ask for technique help
Mateusz Loskot
mateusz at loskot.net
Sun Aug 19 14:20:04 EDT 2007
chenxuexia wrote:
> hello,gdal teams. Now i begin to use gdal to develop a plugg-in
> for reading ArcGIS data. There's a field value showing like
> "2.3565E-06", and the field type is displayed as float in
> ArcCatolo.
What datasource do you read?
What does the "There's" mean here - there means where,
in a database, in a shapefile?
> also displayed as figure while export to dBase. But when i
> reading it in gdal, the field type is "OFTIntegerList",
I don't know.
Perhaps there is some bug, perhaps type is translated incorrectly.
Anyway, to be sure, more details are needed about what datasource do you
use.
> :1. how and why do you store this "2.3565E-06" as an IntegerList?2.
> how can i reading field of this type into a CString object?3.
Where does the CString come from?
What is that?
Personally, I know 2 similar classes , ATL::CString, WTL::CString,
I bet there is one for MFC.
> which types can be readed by GetFieldAsString() function?
Check the manual:
http://www.gdal.org/ogr/classOGRFeature.html#c7a0224e13dce1f9479a6bf2111ea766
> ////////////////////////////////// //Codes below are mine: if(
> FieldType == OFTIntegerList || FieldType == OFTRealList ) {// how to
> put a OFTIntegerList object like "5.26521E-06"into a CString object?
> strField.Format("%e",poFeature->GetFieldAsString(j)); //ERROR! }
What does the %e formatter do here?
I suppose it should read %s.
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list