[gdal-dev] misssing field width information when getting OGRLayer	form filegdb
    Rebecca 
    wxx114 at 163.com
       
    Wed Jan  7 23:04:00 PST 2015
    
    
  
I get ogrlayer from fielgdb , when I try to get the field information such as
field name, field width, field type, I found the field name and field type
is right , but field width is zero when the field type is OFTString. 
   Does the filegdb lost the field width information in gdal-filegdb?
OGRDataSource *pOGRDS...
OGRLayer *pLayer=pOGRDS->GetLayerByName(filename.c_str());
for(int i=0;i<pLayer->GetLayerDefn()->GetFieldCount();i++)
{
	OGRFieldDefn *pDef=pLayer->GetLayerDefn()->GetFieldDefn(i);
	std::string name=pDef->GetNameRef();
	int width=pDef->GetWidth(); //width =0
}
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/misssing-field-width-information-when-getting-OGRLayer-form-filegdb-tp5180487.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
    
    
More information about the gdal-dev
mailing list