Skip to content

Commit

Permalink
Revert "Fix Vector info bug #359 (#364)"
Browse files Browse the repository at this point in the history
This reverts commit 652982f.
  • Loading branch information
linakrisztian authored Jan 16, 2023
1 parent 652982f commit a76fce4
Showing 1 changed file with 14 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,30 @@ def _execute(self):
vector_name = self.rdc.map_name
self.required_mapsets.append(self.mapset_name)

pc_1 = {}
pc_1["1"] = {
"module": "v.db.connect",
pc = {}
pc["1"] = {
"module": "v.info",
"inputs": {"map": vector_name + "@" + self.mapset_name},
"flags": "g"
"flags": "gte",
}

self.skip_region_check = True
process_list = (
self._create_temporary_grass_environment_and_process_list(
process_chain=pc_1, skip_permission_check=True
)
)
self._execute_process_list(process_list)

kv_list = self.module_output_log[0]["stdout"].split("\n")

pc_2 = {}
pc_2["1"] = {
pc["2"] = {
"module": "v.info",
"inputs": {"map": vector_name + "@" + self.mapset_name},
"flags": "gte",
"flags": "h",
}

pc_2["2"] = {
pc["3"] = {
"module": "v.info",
"inputs": {"map": vector_name + "@" + self.mapset_name},
"flags": "h",
"flags": "c",
}
# case 1: no layer (len(kv_list)==1)
# ==> nothing to be added to the results
if len(kv_list) == 2:
# case 2: single layer
pc_2["3"] = {
"module": "v.info",
"inputs": {"map": vector_name + "@" + self.mapset_name},
"flags": "c",
}
elif len(kv_list) > 2:
# case 3: multiple layers
pc_2["3"] = {
"module": "v.db.connect",
"inputs": {"map": vector_name + "@" + self.mapset_name},
"flags": "g",
}

process_list = self._validate_process_chain(
process_chain=pc_2, skip_permission_check=True

self.skip_region_check = True
process_list = (
self._create_temporary_grass_environment_and_process_list(
process_chain=pc, skip_permission_check=True
)
)
self._execute_process_list(process_list)

Expand Down

0 comments on commit a76fce4

Please sign in to comment.