Invert polygons for fun and new functionality

create temp function ST_Invert(g GEOGRAPHY) AS  (
ST_Difference(ST_GeogFromText('fullglobe'), g)
);
Input shapes
Complementary shapes
ST_Invert(ST_Union_Agg(ST_Invert(poly)))

--

--

--

Hi, I'm TL of BigQuery Geospatial project. Posting small recipes and various notes for BQ Geospatial users.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Collatz Conjecture — A New Perspective on an Old Problem

NEAR PRICE PREDICTION

Mathematical Analysis — Finding Your Limits

Kruskal’s Algorithm

Understanding the Fourier Series

Hypothesis Testing: Understanding A/B testing

DIFFERENTIATION(101)

Good Algorithm to know — part1 . GCD, LCM, Euclidean algorithm

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael Entin

Michael Entin

Hi, I'm TL of BigQuery Geospatial project. Posting small recipes and various notes for BQ Geospatial users.

More from Medium

Physical Modeling of Tables in BigQuery

Overcoming large-scale geospatial analysis using Google BigQuery

Building a data analytics dashboard on GCP — Part II

Historical & Incremental Pipelines - Snowflake to BigQuery