centreborelli / s2p

Satellite Stereo Pipeline
GNU Affero General Public License v3.0
209 stars 67 forks source link

Work with multiple images #153

Open ouyuanzheng opened 10 months ago

ouyuanzheng commented 10 months ago

I want to use S2P to process multiple images covering the same area, I would like to ask how to set the "roi" parameter in the JSON file. "roi" in the example : "roi" : { "x" : 150, "y" : 150, "w" : 700, "h" : 700 }, how do I get the x and y parameters? What system coordinates are x and y? Can you give me some advice? Thank you so much!

carlodef commented 10 months ago

Hi @ouyuanzheng, the x and y parameters are pixel coordinates of the top-left corner of your Area of Interest in the first image raster.

carlodef commented 10 months ago

For defining the AOI with geographic coordinates instead of pixel coordinates, you can use roi_geojson instead of roi.

roi_geojson expects a geojson polygon dict.

ouyuanzheng commented 10 months ago

I get it, thank you very much for your reply!

ouyuanzheng commented 10 months ago

Hello, is there a limit to the size of W and H values in roi? I use W=2000, H=2000, and I get the following error: s2p tests/data/input_trillet-WV3/config_geo.json WARNING: ignoring unknown parameter skip_existing. WARNING: ignoring unknown parameter utm_bbx. WARNING: ignoring unknown parameter triangulation_mode. tile size: 318 286 total number of tiles: 147 (7 x 7) x 3 pairs

discarding masked tiles... done 47 / 49 tiles Traceback (most recent call last): File "/home/oyz/.local/bin/s2p", line 33, in sys.exit(load_entry_point('s2p', 'console_scripts', 's2p')()) File "/mnt/d/Envirnment-S2P/s2p/s2p/cli.py", line 25, in main s2p.main(user_cfg, start_from=args.start_from) File "/mnt/d/Envirnment-S2P/s2p/s2p/init.py", line 547, in main tiles = initialization.tiles_full_info(tw, th, tiles_txt, create_masks=True) File "/mnt/d/Envirnment-S2P/s2p/s2p/initialization.py", line 390, in tiles_full_info timeout=cfg['timeout']) File "/mnt/d/Envirnment-S2P/s2p/s2p/parallel.py", line 102, in launch_calls outputs.append(r.get(timeout)) File "/usr/lib/python3.6/multiprocessing/pool.py", line 640, in get raise TimeoutError multiprocessing.context.TimeoutError