Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-14 Thread Ole Nielsen
Thanks muchly. I implemented the fieldname launderer and the warning suppression - and all tests pass: https://github.com/AIFDR/riab/commit/ced28719d4878d4dfc3a70a08aebbd5f98bca744 https://github.com/AIFDR/riab/commit/a1e3632fc452af58d6288771b8528432403b8d0c Thanks heaps for all your help Ole

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Even Rouault
- What are the official ogr steps required to store a vector layer (represented as e.g. a list of x, y values and associated feature attributes (name, value))? In particular, is CreateField perhaps obsoleted by something else? Nothing obsoleted here. CreateField() and CreateFeature()

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Ole Nielsen
Hi Even Thanks again for all your help - all tests now pass using either gdal 1.6 or 1.8. Just to summarise, there were three issues as I see them: 1. Bounding boxes for raster data are computed differently (but better) in newer versions 2. While v1.6 of ogre would allow an single

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Even Rouault
Selon Ole Nielsen ole.moller.niel...@gmail.com: Hi Even Thanks again for all your help - all tests now pass using either gdal 1.6 or 1.8. Just to summarise, there were three issues as I see them: 1. Bounding boxes for raster data are computed differently (but better) in newer

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Ole Nielsen
Thanks - I was hoping I could rely on the library to do the intelligent truncation, but couldn't work it out. Can I just clarify that the name to use with SetField would then be what is provided by your last line? layer_defn.GetFieldDefn(last_field_idx).GetNameRef() Cheers and thanks Ole On

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Even Rouault
Selon Ole Nielsen ole.moller.niel...@gmail.com: Thanks - I was hoping I could rely on the library to do the intelligent truncation, but couldn't work it out. Can I just clarify that the name to use with SetField would then be what is provided by your last line?

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Ole Nielsen
Yes this seems to work. However, I get a huge amounts of warnings of the form lyr.CreateField(fd) Warning 6: Normalized/laundered field name: 'A slightly long name' to 'A slightly' 0 They obviously tell what name has been derived, but I don't want this output to clutter, and since that name is

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-06 Thread Even Rouault
Le mercredi 07 septembre 2011 02:36:35, Ole Nielsen a écrit : Yes this seems to work. However, I get a huge amounts of warnings of the form lyr.CreateField(fd) Warning 6: Normalized/laundered field name: 'A slightly long name' to 'A slightly' 0 They obviously tell what name has been

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-05 Thread Ole Nielsen
Dear Even Thank you so much for going through the trouble of reproducing this issue. You have help a lot, but I need one more hint regarding the apparent change in how field names get truncated (Normalized/laundered). To summarise: - I followed your suggestions and rebuilt from scratch. -

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-04 Thread Even Rouault
Le dimanche 04 septembre 2011 05:54:34, Ole Nielsen a écrit : Hi again and sorry for nagging, but do you have any hints as to what this error means return _ogr.Feature_SetField(self, *args) NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-03 Thread Ole Nielsen
Hi again and sorry for nagging, but do you have any hints as to what this error means return _ogr.Feature_SetField(self, *args) NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'. Possible C/C++ prototypes are: SetField(OGRFeatureShadow

[gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-01 Thread Ole Nielsen
Sorry for the addition, but regarding the issue with SetField, I just had the same error with the inputs SetField('STRUCT_DAMAGE_fraction', 0.346734256639) To repeat, this works on every standard Ubuntu installation I have used (10.04, 10.10, 11.04). However, after installing qgis 1.7 on Ubuntu

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-01 Thread Even Rouault
Selon Ole Nielsen ole.moller.niel...@gmail.com: Sorry for the addition, but regarding the issue with SetField, I just had the same error with the inputs SetField('STRUCT_DAMAGE_fraction', 0.346734256639) To repeat, this works on every standard Ubuntu installation I have used (10.04, 10.10,

Re: [gdal-dev] Fwd: NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.

2011-09-01 Thread Ole Nielsen
Thank you very much for replying. The output I got from you suggestion is nielso@shakti:~$ dpkg -l|grep gdal ii gdal-bin 1.8.0-2~natty2 Geospatial Data Abstraction Library - Utility programs ii libgdal1-1.6.0 1.6.3-4build3 Geospatial Data