Hi again, I understand... Perhaps an option could be using something like -lco Z_NODATA_VALUE_DST="X" to translate NODATA from origin to this value X (NaN, 0, or whatever it may be). The driver can offer this number instead of the own NODATA and the user can know that the X value in destination will mean NODATA.
On the other hand, a user could also specify -lco Z_NODATA_VALUE_SRC="Y" so that a driver can identify a value considered NODATA in the source and translate it to the own NODATA value (or the one specified by the first parameter (if it exists)). Is this too complicated? Are there any repercussions that I'm not seeing? Thanks. De: Rahkonen Jukka <jukka.rahko...@maanmittauslaitos.fi> Enviado el: dijous, 25 de gener de 2024 18:27 Para: Abel Pau <a....@creaf.uab.cat>; gdal-dev@lists.osgeo.org Asunto: Re: vector NODATA for Z values? Hi, I think that it depends on the file format. Rather often it is set to zero but I have seen NaN in many places. However, shapefiles explicitly denies NaN "...Positive infinity, negative infinity, and Not-a-Number (NaN) values are not allowed in shapefiles. Nevertheless, shapefiles support the concept of "no data" values, but they are currently used only for measures. Any floating point number smaller than -1038 is considered by a shapefile reader to represent a "no data" value. With the SQLite dialect it is possible to select the value but NaN is not accepted. Can be tested with ogrinfo -dialect SQLite -sql "select CastToXYZ(ST_GeomFromText('POINT (1 2)'),3)" point.json -Jukka Rahkonen- Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org<mailto:gdal-dev-boun...@lists.osgeo.org>> Puolesta Abel Pau via gdal-dev Lähetetty: torstai 25. tammikuuta 2024 19.07 Vastaanottaja: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> Aihe: [gdal-dev] vector NODATA for Z values? Hi, there is any value in GDAL for VECTORS that indicates that a concrete value of a Z is not known (z nodata value)? I couldn't find it anywhere. In MiraMon format we use one concrete number documented in our format pdf (-1.0E+300) an in the driver it's planned to translate it to the same number. I could translate it to the one I am asking. And the same for detecting nodata Z and translate them to -1.0E+300 when reading another format. Thanks! 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<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