Le mardi 11 octobre 2016 12:17:44, Sandro Santilli a écrit :
> On Tue, Oct 11, 2016 at 11:53:27AM +0200, Even Rouault wrote:
> > Le mardi 11 octobre 2016 11:42:12, Jürgen E. Fischer a écrit :
> > > On Tue, 11. Oct 2016 at 10:45:18 +0200, Sandro Santilli wrote:
> > > > Chasing a regression bug upon importing shapefile to postgresql 
> > > > I've stumbled upon an unclear semantic of the "length" member of
> > > > QgsField class .
> > >
> > > Hm, I though that was following database semantics - at least that's
> > > what I recall - maybe it was changed.
> > >
> > > Not sure OGR has a general semantic of it's own, maybe it follows the
> > > data source and those are inconsistent.
> > More or less. My analysis of the OGR situation at:
> > http://hub.qgis.org/issues/15188#note-8
> Then I think the OGR provider should just avoid setting OFTReal fields
> length/precision values, upon reading (but also upon writing, as long
> as the QgsField length/precision for Double-typed fields would not be
> Does it make sense ?
On reading, should be hopefully rather harmless.
On writing, looking quickly at the provider, I couldn't see where
OGR_Fld_SetWidth()/Precision would be called with a non-zero value on a
OFTReal field if QgsField length/precision is not set
Spatialys - Geospatial professional services
Qgis-developer mailing list
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer