Skip to content

Commit

Permalink
Compute bbox on global projection to avoid miscomputation #1493
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Dec 23, 2023
1 parent 5b8720e commit cb89e0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analysers/Analyser_Merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ def insertOfficial(res):
osmosis.run0((sql01_ref if conflate.osmRef != "NULL" else sql01_geo).format(table = table, geom = self.geom, validationGeomSQL = self.validationGeomSQL, where = Select.where_attributes(self.select), distinct = distinct, order_by = order_by), insertOfficial)
osmosis.run(sql02b.format(official = tableOfficial))
if self.parser.imported_srid():
giscurs.execute("SELECT ST_AsText(ST_Envelope(ST_Extent(geom))) FROM {0}".format(tableOfficial))
giscurs.execute("SELECT ST_AsText(ST_Transform(ST_Envelope(ST_SetSRID(ST_Extent(ST_Transform(geom, 4326)), 4326)), {1})) FROM {0}".format(tableOfficial, self.proj))
self.bbox = giscurs.fetchone()[0]
else:
self.bbox = None
Expand Down

0 comments on commit cb89e0a

Please sign in to comment.