Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(bq|transformations): Point on surface functionality for BQ #469

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

vehrka
Copy link
Contributor

@vehrka vehrka commented Jan 12, 2024

Description

This is a PR for the Point on Surface tool for the Analytic Toolbox for BQ.

This tool gives a point close to the centroid but makes sure it's always inside the polygon. With the centroid, sometimes it's outside the polygon, like with semicircular or circular shapes, rings, or holes within.

The Point on Surface always gives a point inside the polygon. This is Postgres' implementation and explanation https://postgis.net/docs/ST_PointOnSurface.html .

Type of change

  • Feature

Acceptance

Please describe how to validate the feature or fix

  1. with a polygon that has the centroid laying outside of the interior of the polygon
  2. run the function to get a point that is inside of the polygon
  3. the point should be inside the polygon

Basic checklist

  • Good PR name
  • Shortcut link (not necessary)
  • Just one issue per PR
  • GitHub labels
  • Proper status & reviewers
  • Tests
  • Documentation

@vehrka vehrka added enhancement New feature or request bigquery labels Jan 12, 2024
@vehrka vehrka requested a review from Jesus89 January 12, 2024 12:56
Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice contribution!

LGTM

Jesus89

This comment was marked as duplicate.

@vehrka vehrka merged commit f65e425 into main Jan 12, 2024
13 checks passed
@vehrka vehrka deleted the feat/pedrof/bq_point_on_surface branch January 12, 2024 13:39
@vdelacruzb vdelacruzb mentioned this pull request Jan 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bigquery enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants