[gdal-dev] 1.11 OGR_F_SetFieldDouble() then OGR_F_GetFieldAsDouble() always returns zero

Nik nik at nixanz.com
Tue Jan 3 00:24:34 PST 2017


Hey, thanks for this advice Even.  I think I may have actually stumbled on a similar issue in the past (with setting geometry) so I really should have known better.  

Thanks for the reminder.   Yes, an update to the doco would help newbies as well as people like me who only dabble around the edges.   

Cheers,
Nik. 

-----------------------------------------
NIK SANDS
Line Tamer | Time Traveller | Space Cadet

> On 3 Jan 2017, at 6:40 pm, Even Rouault <even.rouault at spatialys.com> wrote:
> 
> Nik,
>  
> Using OGR_F_SetFieldXXXXX() only modifies the in-memory value, but has no effect on serialization. You have to use OGR_L_SetFeature() to make sure that the modified feature is written back to the datasource.
>  
> As it seems to be a common pitfall, I'm going to improve the doc of the OGR_F_SetFieldXXXX functions to make that clear.
>  
> Even
>  
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com



More information about the gdal-dev mailing list