Thanks for your answers. When I call aMMIDDBFFile=CPLFindFile("gdal", "MM_m_idofic.dbf"); NULL pointer is obtained and I think I know why. When debuging there are 2 FinderLocations: The first one is “D:\GitHub-repository\GDAL\data;” (note thar there is a “;” at the end). When tries to compose with MM_m_idofic.dbf (the file copied in “data” folder) I obtain: “D:\GitHub-repository\GDAL\data;\MM_m_idofic.dbf”
So, debugging more ERROR_PATH_NOT_FOUND is returned. And I think that “;” is the problem, isn’t it? Has any sense all I am saying? Or I have something wrong anywhere? Thanks!! Sean, > For datum files, have you checked whether they already exist in the PROJ > project? This MM_m_idofic.dbf file is a table of synonyms between the internal SRH identifiers of MiraMon and the EPSG you all know. So, it’s only a help to find the EPSG of a MiraMon layer when translatinc a MiraMon layer to another. Thanks you all and I keep waiting for any help about the misterious “;”. De: Even Rouault <even.roua...@spatialys.com> Enviado el: diumenge, 7 de gener de 2024 12:20 Para: Sean Gillies <sean.gill...@gmail.com>; Abel Pau <a....@creaf.uab.cat> CC: gdal dev <gdal-dev@lists.osgeo.org> Asunto: Re: [gdal-dev] Where to fins my own files Yes, the practice for a resource file is: - put it under data/ - add it to the GDAL_DATA_FILES variable on top level gdal.cmake file - use CPLFindFile("gdal", "your.file") to get its path Le 07/01/2024 à 01:59, Sean Gillies via gdal-dev a écrit : Happy New Year to you too, Abel. Other drivers, such as PCI and NITF, include some files in the data directory. See https://github.com/OSGeo/gdal/tree/master/data. Distributions generally copy these to $prefix/share/gdal on unix-like systems. I'm not aware of a practice of copying data out of a driver's directory to that same location, though it's probably possible with Cmake. Your driver's own directory won't necessarily exist on a system where you install GDAL. For datum files, have you checked whether they already exist in the PROJ project? On Sat, Jan 6, 2024, 2:32 PM Abel Pau via gdal-dev <gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>> wrote: Hi, Happy New 2024 to everyone who celebrates it! I am programming a driver and in some point I need to read a file that contains some information (and it’s better to keep this in a file than in c code) about the Horizontal Reference System. I have this file here: “GDAL\ogr\ogrsf_frmts\miramon”, but when coding I don’t know how to get to this folder. There is any method to open a file (using VSIFOpenL(), for instance) in THIS specific directory? Can I use “GDAL\ogr\ogrsd_frmts\miramon” like that? If not, where can I put this file to be found when executing the code? And how to write this path in the code? Thanks in advance!! Abel Pau Garcia GIS developer [https://www.creaf.cat/sites/default/files/creaf-signature.png] a....@creaf.uab.cat<mailto:a....@creaf.uab.cat> Let's chat on Teams!<https://teams.microsoft.com/l/chat/0/0?users=a....@creaf.uab.cat> 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://twitter.com/CREAF_ecologia>[https://www.creaf.cat/sites/default/files/linkedin-icon-signature.png]<https://www.linkedin.com/company/1363052?trk=tyah&trkInfo=clickedVertical:company,clickedEntityId:1363052,idx:2-1-2,tarId:1465807877789,tas:creaf>[https://www.creaf.cat/sites/default/files/youtube-icon-signature.png]<https://www.youtube.com/c/creafecologia>[https://www.creaf.cat/sites/default/files/instagram-icon-signature.png]<https://www.instagram.com/CREAF_ecologia/> www.creaf.cat<http://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<mailto:gdal-dev@lists.osgeo.org> https://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> https://lists.osgeo.org/mailman/listinfo/gdal-dev -- 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