[gdal-dev] vector NODATA for Z values?
Abel Pau
a.pau at creaf.uab.cat
Fri Jan 26 03:53:52 PST 2024
Perfect then!
I leave at it is and we’ll see.
De: Even Rouault <even.rouault at spatialys.com>
Enviado el: divendres, 26 de gener de 2024 12:17
Para: Abel Pau <a.pau at creaf.uab.cat>; Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi>; gdal-dev at lists.osgeo.org
Asunto: Re: [gdal-dev] vector NODATA for Z values?
Hi,
IMHO, I would not complicate the driver for that. Such options would actually be quite generic, and if we wanted to implement them, they would probably better be implemented as options of ogr2ogr (but should be done separately from your driver submission)
Even
Le 26/01/2024 à 10:59, Abel Pau via gdal-dev a écrit :
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.rahkonen at maanmittauslaitos.fi><mailto:jukka.rahkonen at maanmittauslaitos.fi>
Enviado el: dijous, 25 de gener de 2024 18:27
Para: Abel Pau <a.pau at creaf.uab.cat><mailto:a.pau at creaf.uab.cat>; gdal-dev at lists.osgeo.org<mailto:gdal-dev at 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-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org>> Puolesta Abel Pau via gdal-dev
Lähetetty: torstai 25. tammikuuta 2024 19.07
Vastaanottaja: gdal-dev at lists.osgeo.org<mailto:gdal-dev at 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.pau at creaf.uab.cat<mailto:a.pau at creaf.uab.cat>
Let's chat on Teams!<https://teams.microsoft.com/l/chat/0/0?users=a.pau@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 at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3657 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2547 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 505 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 446 bytes
Desc: image004.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 553 bytes
Desc: image005.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 582 bytes
Desc: image006.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 2208 bytes
Desc: image007.jpg
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.jpg
Type: image/jpeg
Size: 1111 bytes
Desc: image008.jpg
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240126/b2c3cebd/attachment-0003.jpg>
More information about the gdal-dev
mailing list