Re: [gdal-dev] A question of eficiency

2023-07-31 Thread Abel Pau
OOh, ok!!! Thanks!! De: Laurențiu Nicola Enviado el: dilluns, 31 de juliol de 2023 15:24 Para: Abel Pau CC: gdal-dev@lists.osgeo.org, Asunto: Re: [gdal-dev] A question of eficiency Hi, GetFeatureCount() exists for GDAL users, not for driver writers. For example, in QGIS, you can right-click

Re: [gdal-dev] A question of eficiency

2023-07-31 Thread Laurențiu Nicola via gdal-dev
Hi, GetFeatureCount() exists for GDAL users, not for driver writers. For example, in QGIS, you can right-click on a layer, choose "Show Feature Count" and you'll see the number of features next to the layer name. Or, to give another example, a hypothetical application could use it to display

Re: [gdal-dev] A question of eficiency

2023-07-31 Thread Abel Pau
m> Enviat: divendres, 21 de juliol de 2023 19:32 Per a: Abel Pau<mailto:a@creaf.uab.cat>; gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> Tema: Re: [gdal-dev] A question of eficiency Abel, OK, I now better understand what you meant. Well, no, there's no way

Re: [gdal-dev] A question of eficiency

2023-07-21 Thread Abel Pau
nviat: divendres, 21 de juliol de 2023 19:32 Per a: Abel Pau<mailto:a@creaf.uab.cat>; gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> Tema: Re: [gdal-dev] A question of eficiency Abel, OK, I now better understand what you meant. Well, no, there's no way

Re: [gdal-dev] A question of eficiency

2023-07-21 Thread Even Rouault
with change radically. Thankss! *De:*gdal-dev *En nombre de *Abel Pau *Enviado el:* divendres, 7 de juliol de 2023 12:44 *Para:* Even Rouault ; gdal-dev@lists.osgeo.org *Asunto:* Re: [gdal-dev] A question of eficiency Hi again, I can totally give this number in GetFeatureCount(). No problem from

Re: [gdal-dev] A question of eficiency

2023-07-21 Thread Abel Pau
! De: gdal-dev En nombre de Abel Pau Enviado el: divendres, 7 de juliol de 2023 12:44 Para: Even Rouault ; gdal-dev@lists.osgeo.org Asunto: Re: [gdal-dev] A question of eficiency Hi again, I can totally give this number in GetFeatureCount(). No problem from my driver to other. Then I understand

Re: [gdal-dev] A question of eficiency

2023-07-07 Thread Norman Vine via gdal-dev
With some formats sizeof, fseek and ftell can be most useful > On Jul 7, 2023, at 5:33 AM, Abel Pau wrote: > > Hi, > I would like to know if when we use the code of GDAL to program a driver (or > whatever) in vectors (so, ogr) we can assume that we can know the number of > elements we are

Re: [gdal-dev] A question of eficiency

2023-07-07 Thread Abel Pau
that, but... Thanks for your kind anwser! De: Even Rouault Enviado el: divendres, 7 de juliol de 2023 12:32 Para: Abel Pau ; gdal-dev@lists.osgeo.org Asunto: Re: [gdal-dev] A question of eficiency Abel, At the minimum for the reading side of a vector driver, you need to implement GetNextFeature

Re: [gdal-dev] A question of eficiency

2023-07-07 Thread Even Rouault
Abel, At the minimum for the reading side of a vector driver, you need to implement GetNextFeature(). If there is an efficient way of knowing the number of features without iterating over the whole file (typically a field in a header giving that number), you may implement GetFeatureCount().

[gdal-dev] A question of eficiency

2023-07-07 Thread Abel Pau
Hi, I would like to know if when we use the code of GDAL to program a driver (or whatever) in vectors (so, ogr) we can assume that we can know the number of elements we are going to import in any way or it would be possible not knowing that until NextFeature is empty (or something like that).