ubarsc / tuiview

TuiView is a lightweight raster GIS with powerful raster attribute table manipulation abilities
http://tuiview.org/
GNU General Public License v2.0
28 stars 12 forks source link

Multi viewer vector layer open #10

Closed eco-nz closed 3 years ago

eco-nz commented 3 years ago

When opening a vector layer provide an option to add it to multiple or all open viewers at once. Requested by James Shepherd

gillins commented 3 years ago

@eco-nz is this in the GUI or command line, or both? In the GUI would you have a tick box "Open in all viewers"? Or a way of selecting only some viewers?

eco-nz commented 3 years ago

Hmm, this is James's request originally @gillins - I think he was talking about the GUI. The shell would expand the CLI by default wouldn't it?

gillins commented 3 years ago

There is a --vector command line option so you can open it with a vector on top. But if you open multiple viewers with --separate, I think only the first one gets the vector... Maybe there should be a --vectorall command line option to put vector on all viewers?

eco-nz commented 3 years ago

Yup, that sounds good @gillins ... or possibly being able to address the viewers you want --viewers Foo,Bar or --viewers all - TBH you're solution is probably what he wants.

gillins commented 3 years ago

As an aside, --vector isn't that brilliant since it pops up a little window asking which layer so it doesn't save much mouse work. Might be a good opportunity to add a --vectorlayer option. If not specified the window asking for which layer still gets shown?

gillins commented 3 years ago

ping @shepjd

gillins commented 3 years ago

@shepjd does this refer to the GUI or the command line?

shepjd commented 3 years ago

command line, just want option to put same vector on all viewers (--separate), don't mind choosing the layer with the mouse in single popup, wouldn't want to have to chose for each window

gillins commented 3 years ago

@shepjd have created a PR for this. Now only asks for layername (or SQL) for the first viewer then uses the same for all the other viewers. Have added a --vectorlayer option which must be specified the same number of times as --vector where you can specify the layername and prevent the dialog being shown. Do you want to give it a quick install and see if it does what you want? Instructions below:

cd /tmp
git clone https://github.com/gillins/tuiview.git
cd tuiview
git checkout vectorcmdline
python setup.py install
shepjd commented 3 years ago

Hi Sam, just tried it out, worked perfectly, great to see the layers appears on 5 windows ready to go!