Hi Sean, I uploaded the shapefile together with a demo script here: http://flatpolar.org/floatval.zip
Executing the script produces the following output with my setup: Item Nr. 0 : 1.0 Item Nr. 1 : 613.0 Item Nr. 2 : 1.0 Item Nr. 3 : 0.0 Item Nr. 4 : 1.0 Item Nr. 5 : 1.0 Item Nr. 6 : 0.0 Item Nr. 7 : 1.0 Item Nr. 8 : 1.0 Item Nr. 9 : 500.0 while the output should be: Item Nr. 0 : 1.5 Item Nr. 1 : 613.0 Item Nr. 2 : 1.5 Item Nr. 3 : 0.94 ... The attribute field used is named 'LEISTUNG'. I'm probably just doing something wrong here, but I'm really stuck. Thank you very much for your support, this is highly appreciated! Best regards (and since this is my first post here, hello to everybody). Michael > Hi Michael, > > I can't reproduce this error with any data I have. Can you put your > shapefile up for download and tell me which field(s) are the ones being > rounded? I'll take a look if you can. > > Yours, > > > On Fri, May 9, 2014 at 6:14 AM, Michael Nolde > <no...@geographie.uni-kiel.de>wrote: > >> Hi there, >> >> I noticed some strange behavior when reading float values from shapefile >> attributes with fiona. >> In the attribute table, I have the following values (type of column is >> 'float'): >> 1.5, 613.0, 0.9 >> >> but when I open the shapefile with fiona and read the attributes with >> something like: >> >> somevar = float(item['properties']['VAR']) >> I get: 1.0, 613.0, 0.0 >> >> So the values seem to be rounded down. Am I missing something? Could >> this >> be a bug? >> The fiona version I use is: 1.1.4 (Python 2.7.6 on Ubuntu 14.04 64 bit). >> >> Best regards, >> Michael >> >> >> >> >> -- >> Dr. rer. nat. Michael Nolde >> Christian-Albrechts-Universität zu Kiel >> Geographisches Institut (Sektion Geographie) >> Neufeldtstraße 10, Laurispark - Geb. 32, 24118 Kiel >> Tel.: 0431 880-4909 >> E-Mail: no...@geographie.uni-kiel.de >> >> _______________________________________________ >> Community mailing list >> Community@lists.gispython.org >> http://lists.gispython.org/mailman/listinfo/community >> >> > > > -- > Sean Gillies > _______________________________________________ > Community mailing list > Community@lists.gispython.org > http://lists.gispython.org/mailman/listinfo/community > -- _______________________________________________ Community mailing list Community@lists.gispython.org http://lists.gispython.org/mailman/listinfo/community