Skip to content

Commit

Permalink
Merge pull request #3169 from Geoportail-Luxembourg/forage
Browse files Browse the repository at this point in the history
Forage
  • Loading branch information
rmichaelis authored Jul 12, 2024
2 parents e442901 + 9d6d6c5 commit 6ab881f
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions geoportal/geoportailv3_geoportal/views/getfeatureinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,21 +356,39 @@ def get_info(self, fid, coordinates_big_box, coordinates_small_box,
coords = box2.split(',')
the_box = box(float(coords[0]), float(coords[1]),
float(coords[2]), float(coords[3]))

geometry = geojson_loads(geojson.dumps(mapping(the_box.centroid)))
f = self.to_feature(luxgetfeaturedefinition.layer, None,
geometry,
[],
[],
None)
f = []
if luxgetfeaturedefinition.rest_url is not None and len(luxgetfeaturedefinition.rest_url) > 0:
features = self._get_external_data(
luxgetfeaturedefinition.layer,
luxgetfeaturedefinition.rest_url,
None,
None, None, None, None,
None,
use_auth=luxgetfeaturedefinition.use_auth,
p_geometry=the_box.centroid.wkt, srs_geometry="2169")
if len(features) > 0:
f.append(self.to_feature(luxgetfeaturedefinition.layer, None,
geometry,
[],
[],
None))
else:
f.append(self.to_feature(luxgetfeaturedefinition.layer, None,
geometry,
[],
[],
None))
results.append(
self.to_featureinfo(
[f],
f,
luxgetfeaturedefinition.layer,
luxgetfeaturedefinition.template,
is_ordered,
luxgetfeaturedefinition.has_profile,
luxgetfeaturedefinition.remote_template,
1))
len(f)))
continue
if (luxgetfeaturedefinition is not None and
luxgetfeaturedefinition.engine_gfi is not None and
Expand Down

0 comments on commit 6ab881f

Please sign in to comment.