Created
November 23, 2022 18:45
-
-
Save zacdezgeo/b88e034bceda5a638430b0584a44c9cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table chief_loop_bounds_out as | |
with world as ( | |
select st_makeenvelope(-180, -90, 180, 90, 4326) geom | |
), | |
env as ( | |
select st_transform(st_minimumboundingcircle(st_collect(t.geom)), 4326) geom from dbt.chief_three_peaks_loop t | |
) | |
select st_makepolygon(st_exteriorring(w.geom), Array[st_exteriorring(t.geom)]) geom from world w, env t; | |
create table chief_loop_bounds_in as | |
select st_transform(st_minimumboundingcircle(st_collect(t.geom)), 4326) geom from dbt.chief_three_peaks_loop t; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment