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

Work with multiple images #153

Open
ouyuanzheng opened this issue Jan 9, 2024 · 4 comments
Open

Work with multiple images #153

ouyuanzheng opened this issue Jan 9, 2024 · 4 comments

Comments

@ouyuanzheng
Copy link

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
Copy link
Member

carlodef commented Jan 9, 2024

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
Copy link
Member

carlodef commented Jan 9, 2024

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
Copy link
Author

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

@ouyuanzheng
Copy link
Author

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

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