Skip to content

Commit

Permalink
QGIS -= select - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Jul 20, 2024
1 parent 58e4ba3 commit 4c3a663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
16 changes: 3 additions & 13 deletions blue_geo/QGIS/console/QGIS.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
class ABCLI_QGIS(object):
def __init__(self):
self.app_list = []
self.object_name = self.timestamp()

def add_application(self, app):
self.app_list += [app]
Expand Down Expand Up @@ -65,7 +64,7 @@ def create_video(self, filename="QGIS", object_name=""):
"abcli",
"create_video",
f"png,fps=2,filename={filename},gif",
object_name if object_name else self.object_name,
object_name if object_name else project.name,
]
)

Expand All @@ -88,7 +87,6 @@ def help(self, clear=False):
if clear:
self.clear()

log("object", self.object_name, icon="📂")
log("Q.clear()", "clear Python Console.")
log("Q.create_video()", "create a video.")
layer.help()
Expand All @@ -101,7 +99,6 @@ def help(self, clear=False):
if verbose:
log("Q.refresh()", "refresh.")
log("Q.reload()", "reload all layers.")
log('Q.select("<object-name>")', "select <object-name>.")
if verbose:
log("Q.unload(layer_name)", "unload layer_name.")
log('Q.upload("|<object-name>|layer|project|qgz")', "upload.")
Expand Down Expand Up @@ -179,7 +176,7 @@ def load(
def object_path(self, object_name=""):
output = os.path.join(
abcli_object_root,
object_name if object_name else self.object_name,
object_name if object_name else project.name,
)
os.makedirs(output, exist_ok=True)
return output
Expand Down Expand Up @@ -212,13 +209,6 @@ def reload(self):
for layer_ in tqdm(QgsProject.instance().mapLayers().values()):
layer_.dataProvider().reloadData()

def select(self, object_name=""):
self.object_name = object_name if object_name else self.timestamp()
log(f"object_name: {self.object_name}", icon="📂")
log(f"object_path: {self.object_path()}", icon="📂")

os.makedirs(self.object_path(), exist_ok=True)

def timestamp(self):
return time.strftime(
f"%Y-%m-%d-%H-%M-%S-{random.randrange(100000):05d}",
Expand Down Expand Up @@ -246,7 +236,7 @@ def upload(self, object_name=""):
else (
layer.object_name
if object_name in ["layer", layer]
else object_name if object_name else self.object_name
else object_name if object_name else project.name
)
),
]
Expand Down
2 changes: 1 addition & 1 deletion blue_geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization."

VERSION = "4.63.1"
VERSION = "4.64.1"

REPO_NAME = "blue-geo"

Expand Down

0 comments on commit 4c3a663

Please sign in to comment.