[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raster import #3

Closed
downey205 opened this issue Sep 4, 2020 · 1 comment
Closed

raster import #3

downey205 opened this issue Sep 4, 2020 · 1 comment

Comments

@downey205
Copy link
downey205 commented Sep 4, 2020

I am trying to import a 5-band raster and run the demo code on it. It works through the call to perform_PCA() call, and just hangs there. perform_radiometric_filtering() seems to work correctly. I am attaching a debugging version of the code and a small cropped area from my raster. I am using convert2bil() and add the correct wavelength info for the sensor (Micasense RedEdge) and I have tried multiple different versions of raster grids, etc., but none of it seems to make a difference. Here I am providing a GeoTiff. Thanks in advance.


> print("PERFORM DIMENSIONALITY REDUCTION")
> PCA_Output <- perform_PCA(Input_Image_File = Input_Image_File, Input_Mask_File = Input_Mask_File,
>                           Output_Dir = Output_Dir, TypePCA = TypePCA, FilterPCA=FilterPCA,
>                           nbCPU = nbCPU, MaxRAM = MaxRAM, Continuum_Removal = Continuum_Removal)
> # *********************************************************
> #   IF MULTI / HYPERSPECTRAL DATA: 
> #   Please make sure the wavelengths are in nanometers or micrometers
> # if not, stop processing and convert wavelengths in nanometers
> # or micrometers in HDR file
> # *********************************************************
> #   Exclude spectral domains corresponding to water vapor absorption
> # The following spectral domains (min and max spectral band in nanometers) will be discarded
> # [,1] [,2]
> # Excluded_WL    0  400
> # 895 1005
> # 1180 1480
> # 1780 2040
> # Please define the input variable Excluded_WL when calling perform_PCA
> # if you want to modify these spectral domains
> # [1] "Extract pixels from the images to perform PCA on a subset"

code hangs here. I have let it run overnight and it never completes
go_debug.zip

UPDATE: I updated to R 4.0.2 and it seemed to run past the PCA. But the rasters it producing are sparse so there are still problems.

@jbferet
Copy link
Owner
jbferet commented Oct 2, 2020

The issues reported here were analyzed and we could identify what went wrong.
Based on our exchange ith downey205, here are a few information that are still required on user side (some may be managed by biodivMapR in future versions):

  • Spectral bands need to be defined in ascending order in teh image stack.
  • image coding (signed / unsigned integer or float) needs to be correctly specified in the header file (please refer to https://www.harrisgeospatial.com/docs/ENVIHeaderFiles.html and make sure the data type corresponds to your image)
  • RS data which are not BOA reflectance may need to be adjusted so that continuum removal performs properly

@jbferet jbferet closed this as completed Oct 2, 2020
jbferet added a commit that referenced this issue Jan 31, 2022
jbferet added a commit that referenced this issue Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants