Re: [gdal-dev] A qüestion about ICreateLayer() and it's parameter eType

2024-02-19 Thread Abel Pau via gdal-dev
Thanks,
I didn’t know that you can comment the name (but not the type) to explicity 
tell the compiler this parameter will not be used!


De: Even Rouault 
Enviado el: diumenge, 18 de febrer de 2024 19:08
Para: Abel Pau ; gdal-dev@lists.osgeo.org
Asunto: Re: [gdal-dev] A qüestion about ICreateLayer() and it's parameter eType



Le 12/02/2024 à 11:05, Abel Pau via gdal-dev a écrit :
Hi again,
forget the question.
I finally use the variable to inform that layers with measures will be 
processed without Measures.
Otherwise you can just use the parameter type without its name (or by 
commenting out the name)

void foo(int /* ignored_parameter */)

You might also find the following more verbose version, but I'd tend to prefer 
the above on

void foo(CPL_UNUSED int ingored_parameter)



Most drivers don't warn if you provide a measured geometry type and they only 
support the 2D version. Actually drivers that support measured geometries 
should explicitly advertize the OLCMeasuredGeometries layer capability. Cf 
https://gdal.org/development/rfc/rfc61_support_for_measured_geometries.html#compatibility-issues

Even

--

http://www.spatialys.com

My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] A qüestion about ICreateLayer() and it's parameter eType

2024-02-18 Thread Even Rouault via gdal-dev


Le 12/02/2024 à 11:05, Abel Pau via gdal-dev a écrit :


Hi again,

forget the question.

I finally use the variable to inform that layers with measures will be 
processed without Measures.


Otherwise you can just use the parameter type without its name (or by 
commenting out the name)


void foo(int /* ignored_parameter */)

You might also find the following more verbose version, but I'd tend to 
prefer the above on


void foo(CPL_UNUSED int ingored_parameter)


Most drivers don't warn if you provide a measured geometry type and they 
only support the 2D version. Actually drivers that support measured 
geometries should explicitly advertize the OLCMeasuredGeometries layer 
capability. Cf 
https://gdal.org/development/rfc/rfc61_support_for_measured_geometries.html#compatibility-issues


Even

--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] A qüestion about ICreateLayer() and it's parameter eType

2024-02-12 Thread Abel Pau via gdal-dev
Hi again,
forget the question.
I finally use the variable to inform that layers with measures will be 
processed without Measures.

Thanks again

De: gdal-dev  En nombre de Abel Pau via 
gdal-dev
Enviado el: dilluns, 12 de febrer de 2024 10:05
Para: gdal-dev@lists.osgeo.org
Asunto: [gdal-dev] A qüestion about ICreateLayer() and it's parameter eType

Hi,

I am currently addressing all errors in Actions (in my fork), and I've 
encountered this one in 'slow_tests (slow_tests, ubuntu_22_04, build.sh, 
test.sh)':

/home/runner/work/gdal/gdal/ogr/ogrsf_frmts/miramon/ogrmiramondatasource.cpp:133:44:
 error: unused parameter 'eType' [-Werror=unused-parameter]

It's true, I'm not using this parameter because I don't need it at the moment. 
I'm adding features in the appropriate layer in the ICreateFeature() function.

So, my question is, should I be using this parameter for anything other than 
determining the type of layer I'm working with?

Thanks :)

Abel Pau Garcia
GIS developer
[https://www.creaf.cat/sites/default/files/creaf-signature.png]
a@creaf.uab.cat
Let's chat on 
Teams!
Tel. +34 934814277
[https://www.creaf.cat/sites/default/files/so-en-signature.png]
[https://www.creaf.cat/sites/default/files/twitter-icon-signature.png][https://www.creaf.cat/sites/default/files/linkedin-icon-signature.png][https://www.creaf.cat/sites/default/files/youtube-icon-signature.png][https://www.creaf.cat/sites/default/files/instagram-icon-signature.png]
www.creaf.cat | http://blog.creaf.cat
[https://www.creaf.cat/sites/default/files/uab_logo_signatura.png]
CREAF. Campus UAB. Edifici C. 08193 Bellaterra (Barcelona)

Before printing this electronic message, think about the environment.



___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev