Re: [gdal-dev] misssing field width information when getting OGRLayer form filegdb

2015-01-08 Thread Rebecca
Even 

  only the field which type is string has width attribute, so you mean it's
impossible to get field width by OGRFieldDefn::GetWidth() function. Then it
is impossiable to convert vector data from filegdb to shp/mif accurately, 
because the field width in filegdb is zero, then the output layer field
width will be 254.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/misssing-field-width-information-when-getting-OGRLayer-form-filegdb-tp5180487p5180723.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] misssing field width information when getting OGRLayer form filegdb

2015-01-07 Thread Rebecca
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;iGetLayerDefn()->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.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] why the layer changed geometry type after insert into gdb

2015-01-07 Thread Rebecca
I created a gdb with filegdab api  in gdal, then create an ogrlayer int gdb
by function CreateLayer(newlayername,spatial,geotype,option), 
 the thrid parameter "geotype"=wkbLinestring, after created the layer,  I
get the layer geometry type by function layerGeoType=pLayer->getgeomtype();
but the "layerGeoType"=wkbmultilinestring, is not the same as before I set
the layer type wkbLinestring.
  I tried wkblinestring layer, wkbpolygon layer , all the layer into gdbfile
, their geometry type become wkbmultilinestring, wkbmultipolygon, how could
I control the layer geometry type in filegdb which would be the same as
before.

Rebecca



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/why-the-layer-changed-geometry-type-after-insert-into-gdb-tp5180310.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] how to set filegdb encoding

2015-01-07 Thread Rebecca
thank Even, I convert the string in utf8 and then dump the feature to gdb,
then there is no messy code, all chinese character is right. thank you very
much !



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/how-to-set-filegdb-encoding-tp5180296p5180303.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev