Giter Club home page Giter Club logo

Comments (8)

petket-5 avatar petket-5 commented on June 4, 2024 1

Hi,

@coffeebread42 : As mention by @ilunaa , this is a module found directly inside the Start_maja directory. Did you check whether you cloned the whole Start_maja project?

@ilunaa Your gdal install is corrupted, this is not an error of DTMCreation. If you run the command gdal_merge.py -o /media/ernesto/cuatrot/maja_procesos/dtm/tmp... listed at the end of the error, you should be able to recreate it and thus be able to isolate it to an error related to gdal. If you installed gdal via pip/conda, it can be sufficient to just reinstall it.

Kind regards,
Peter

from maja.

petket-5 avatar petket-5 commented on June 4, 2024

Hi,

There is an updated version of the same script (with slightly different parameters, check readme for exemplary cmdline):
https://github.com/CNES/Start-MAJA/tree/reprog-rc1/prepare_mnt

Can you please try with that instead?

Kind regards,
Peter

from maja.

coffeebread42 avatar coffeebread42 commented on June 4, 2024

Thank You Peter, I will try this out and let you know how it goes

from maja.

coffeebread42 avatar coffeebread42 commented on June 4, 2024

Hello Peter
When I try to run the script I get an error No module named 'Chain'. I tried looking and installing this module, but I couldn't find it. I did find a possible explanation for this error could be due to the lack of an init.py file, but in my case I do have an empty init.py file in the directory where the DTMCreation.py is located
Could this be a problem with my python installation that I need to look out for?
ier3

from maja.

intiluna avatar intiluna commented on June 4, 2024

Dear Coffeebread42,

The chain module is in the files (https://github.com/CNES/Start-MAJA/tree/reprog-rc1/Chain). You have to download all the branch: https://github.com/CNES/Start-MAJA/tree/reprog-rc1

Later you unzip, run the terminal from new recently downloaded folder "prepare_mnt" and there try python >>DTMCreation.py -h
You will get a different set of commands compared to the previous version: "https://github.com/CNES/Start-MAJA/blob/master/prepare_dtm/Readme.md"

The info you would read is:
usage: DTMCreation.py [-h] -p PRODUCT [-o OUT_DIR] [-d DEM_DIR] [-w WATER_DIR]
[-t TEMP_DIR] [--type_dem TYPE_DEM] [-c COARSE_RES] [-v]

optional arguments:
-h, --help show this help message and exit
-p PRODUCT, --product PRODUCT
The path to a Landsat-8, Venus or Sentinel-2 L1C/L2A
product folder.
-o OUT_DIR, --out_dir OUT_DIR
Output directory. Default is the current directory.
-d DEM_DIR, --dem_dir DEM_DIR
The path to the folder containing the SRTM zip-
archives.If not existing, an attempt will be made to
download them.
-w WATER_DIR, --water_dir WATER_DIR
The path to the folder containing the GSW occurence
.tif-files.If not existing, an attempt will be made to
download them.
-t TEMP_DIR, --temp_dir TEMP_DIR
The path to temp the folder.If not existing, it is set
to a /tmp/ location
--type_dem TYPE_DEM DEM type. Default is 'SRTM'.
-c COARSE_RES, --coarse_res COARSE_RES
Coarse resolution in meters. Default is 240
-v, --version show program's version number and exit

Besides that, I have not try to create the dtm this way. I will try today and post here how it goes.
Thank you Peter,

Cheers

from maja.

intiluna avatar intiluna commented on June 4, 2024

Dear Coffeebread42 and Peter,

I tried:

  1. Download water bodies information from:
    https://global-surface-water.appspot.com/download
  2. Set folders (temp files) and the rest (as described in the help description).
  3. Run the command:
    python DTMCreation.py -p /media/ernesto/cuatrot/peps_download/s2_dtmsample/S2A_MSIL1C_20190810T160911_N0208_R140_T16PDU_20190810T212513.SAFE/ -d /media/ernesto/cuatrot/maja_procesos/dtm/SRTM/ -w /media/ernesto/cuatrot/maja_procesos/dtm/GSW/ -t /media/ernesto/cuatrot/maja_procesos/dtm/tmp -o /media/ernesto/cuatrot/maja_procesos/dtm/DTM/

As a result it sends a message that it works but with some errors. Here is a screenshot:

screenshot_terminal_mntprep

I checked the temp folder and there is an occurrence.tif but nothing in the output folder. I also checked that is installed gdal_merge.py
What could be the problem?

Thanks for your help,

from maja.

intiluna avatar intiluna commented on June 4, 2024

Dear Peter,
Thank you for your comments. I managed to solve the gdal problem and now it works fine. It creates the 2 files:
image

King regards,

from maja.

coffeebread42 avatar coffeebread42 commented on June 4, 2024

Dear @petket-5 and @ilunaa
Thank you very much for your help I managed to solve the problem

from maja.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.