How can I transform No Data Value from zero to NA?

29 views
Skip to first unread message

Beatriz Pierri Daunt

unread,
Mar 20, 2017, 1:35:39 PM3/20/17
to RSGISLib Support

Dear all

I am having problem with no data value during the segmentation process. One of my raster files has some zero value, because it came from a vector file.

It seems that python is considering the pixel with zero value as no data value to stack the images files.

How can I transform the no data value to NA, or any other symbol besides numeric.

Thank you very much

Beatriz


Pete Bunting [pfb]

unread,
Apr 11, 2017, 5:49:38 PM4/11/17
to Beatriz Pierri Daunt, RSGISLib Support
Hi Beatriz, 

Sorry for slow reply. I would suggest you use band maths to add 1 to pixel values and define the no data regions with a pixel value of 0. 

Best wishes, 

Pete
****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK

* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.



--------------------------------------------------------------------
Un o’r 4 prifysgol uchaf yn y DU a’r orau yng Nghymru am fodlonrwydd myfyrwyr.
(Arolwg Cenedlaethol y Myfyrwyr 2016)
www.aber.ac.uk

Top 4 UK university and best in Wales for student satisfaction
(National Student Survey 2016)
www.aber.ac.uk
Reply all
Reply to author
Forward
0 new messages