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

Prepare version 1.9.9 #58

Merged
merged 42 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c8a24e0
refactor IMLNetworkManager import
minff Sep 17, 2023
bbf8c4f
add china platform url + commit encoded url + test
minff Sep 7, 2023
189b4f7
ui: show different platform servers if here system detected
minff Sep 15, 2023
1848872
ui: set default similarity_threshold to 0 (single layering)
minff Sep 27, 2023
7fe4c17
correct prepare fields logic + refactor fields similarity to int 0-100
minff Sep 27, 2023
b5fb5bb
try not clear auth for 403
minff Sep 28, 2023
ed0b16e
less network log
minff Sep 28, 2023
22c25a4
treat all iml layer as livemap for editing flow
minff Oct 3, 2023
1cd50b6
handle layer destroy gracefully without dangling layer
minff Oct 8, 2023
2356dae
better handle 401 error by increasing max retry
minff Oct 10, 2023
bb4db8c
bump version 1.9.9
minff Oct 10, 2023
070c0bb
try to raise rendering error
minff Sep 28, 2023
0f6a738
slow: try to handle OGR error due to mismatch fields
minff Oct 9, 2023
e68b392
debug fields parser
minff Oct 10, 2023
deaf38e
test: add subtest info for test_render_layer
minff Oct 10, 2023
b16983e
fix parser
minff Oct 10, 2023
64b5677
update test util
minff Oct 13, 2023
5ce5763
fixed test parser
minff Oct 13, 2023
f769599
refactor test parser
minff Oct 13, 2023
994b2a1
make test_render_layer work for similarity_threshold=0 (single fields…
minff Oct 13, 2023
8f64078
update Dict type hint
minff Oct 13, 2023
017a519
raise NetworkUnauthorized only for 401
minff Feb 12, 2024
edaf829
deprecated datahub server
minff Feb 26, 2024
c40d25e
refactor network
minff Feb 26, 2024
64d844c
correct clear auth
minff Feb 26, 2024
f4c0838
check here system in thread to avoid blocking UI
minff Feb 26, 2024
a693bc8
use addsitedir
minff Feb 26, 2024
932f73b
update changelog version 1.9.9
minff Feb 26, 2024
edb074a
cleanup network error message
minff Feb 29, 2024
32747ad
draft: try to make layer id unique, rename to iid
minff Feb 29, 2024
7558bdf
improve install deps script (pip) + try QtWebEngineWidgets (not working)
minff Mar 6, 2024
7fc96c7
use qml, QtWebEngine and QtQuick again
minff Mar 7, 2024
05e3813
update build script for win
minff Mar 7, 2024
bd120cf
Fix error since QGIS 3.36.0+: Failed to create OpenGL context for for…
minff Mar 7, 2024
7567d06
fix apply_token
minff Mar 11, 2024
f6cdf2b
update build script for alpha version, folder suffix
minff Mar 8, 2024
8a9a3ae
test crypter with custom env variable
minff Mar 8, 2024
a0cdda9
improve check domain logic
minff Mar 8, 2024
a1594a2
fix qml dependencies on mac
minff Mar 11, 2024
753cccc
fix qml on mac
minff Mar 12, 2024
9ef5cc9
cleanup
minff Mar 12, 2024
9151e5a
update changelog version 1.9.9
minff Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix parser
This reverts commit c4e901f07fbf8151cc5213f7532e59a3083f7ea4.
minff committed Mar 12, 2024
commit b16983e3af20bf974df570f7d1e9f81e5ee6c96c
21 changes: 11 additions & 10 deletions XYZHubConnector/xyz_qgis/layer/parser.py
Original file line number Diff line number Diff line change
@@ -523,31 +523,32 @@ def xyz_json_to_feature_map(
100: map_fields should have as many as possible fields/geom
"""

def _single_feature_map(feat_json, map_feat, map_fields):
def _single_feature_map(feat_json, map_feat_, map_fields_):
geom = feat_json.get("geometry")
g = geom["type"] if geom is not None else None

# # promote to multi geom
# if g is not None and not g.startswith("Multi"): g = "Multi" + g

lst_fields = map_fields.setdefault(g, list())
lst_fields = map_fields_.setdefault(g, list())
fields, idx = prepare_fields(feat_json, lst_fields, similarity_threshold)

ft = xyz_json_to_feature(feat_json, fields)
feat = xyz_json_to_feature(feat_json, fields)
lst_fields[idx] = feat.fields()
# FIX: as fields is modified during processing, reassign it to lst_fields

lst = map_feat.setdefault(g, list())
lst_feat = map_feat_.setdefault(g, list())
while len(lst_feat) < len(lst_fields):
lst_feat.append(list())
lst_feat[idx].append(feat)

while len(lst) < len(lst_fields):
lst.append(list())
lst[idx].append(ft)

lst_feat = obj["features"]
lst_all_feat = obj["features"]
if map_fields is None:
map_fields = dict()
# map_feat = dict()
map_feat = dict((k, [list() for _ in enumerate(v)]) for k, v in map_fields.items())

for ft in lst_feat:
for ft in lst_all_feat:
_single_feature_map(ft, map_feat, map_fields)

return map_feat, map_fields