-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: add location #114
feat!: add location #114
Conversation
A new table `location` is created to accommodate location data of an account or an event based on GPS coordinates. The new function `distance' calculates the linear distance between two locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the submission, there are just a few lines that likely weren't intended to be submit as is.
What do you think about the earthdistance
module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved by mistake
7f8948f
to
6a75845
Compare
Instead of working with the original GPS coordinates we use the data type GEOMETRY from the PostGIS extension. Table `maevs.location`was dropped in favor of GEOMETRY typed columns in tables `maevsi_private.account' and `maevsi.event'. A collection of location related functions was added in a single source code file `function_package_location.sql`similar to the package feature in Oracle which is missing in PostgreSQL.
Necessary for the Postgraphile PostGIS module.
I'm working on providing a postgraphile image that includes its PostGIS plugin over at https://github.com/maevsi/postgraphile. Also, in my testing, the geography gave way better results than geometry so I switched those. |
I found https://hashrocket.com/blog/posts/juxtaposing-earthdistance-and-postgis and recommend staying with PostGIS. |
Calculations using GEOMETRY instead of GEOMETRY are slower, so I thought we couild live with a trade-off in accuracy. I have been assuming that distances between e.g. New York and Berlind are irrelevent because we focus on a local/regional scope. See https://postgis.net/docs/manual-3.5/using_postgis_dbmanagement.html#PostGIS_Geometry, section 4.3.3, for more details. |
Queries on dictionary tables were added to the verification scripts for spatial indexes.
Assuming your mean |
8fdd930
to
c8f1a9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
## [5.0.0-beta.3](5.0.0-beta.2...5.0.0-beta.3) (2025-01-25) ### ⚠ BREAKING CHANGES * add location (#114) * **event:** add full text search (#121) * **extension:** add postgis (#119) * **grafana:** remove (#107) * **timestamp:** add time zone (#92) ### Features * **account:** add login using email address ([#112](#112)) ([937d255](937d255)) * **account:** add possibility to block ([#73](#73)) ([4ab872e](4ab872e)) * **achievement:** add early bird achievement ([#111](#111)) ([0238bea](0238bea)) * add language enumeration ([76a1465](76a1465)) * add location ([#114](#114)) ([8d9a9d1](8d9a9d1)) * **contact:** add language ([669570f](669570f)) * **contact:** add nickname ([8b7169a](8b7169a)) * **contact:** add timezone ([02da0f9](02da0f9)) * **event_upload:** adjust policies. ([23eb8f4](23eb8f4)) * **event-category-mapping:** check if invited ([4ba7dac](4ba7dac)) * **event:** add full text search ([#121](#121)) ([83533e9](83533e9)) * **event:** add visibility unlisted ([#126](#126)) ([759c4d4](759c4d4)) * **event:** assign images to events ([f4822f8](f4822f8)) * **event:** mark events as favourite ([#109](#109)) ([7b75524](7b75524)) * **extension:** add postgis ([#119](#119)) ([5a24dfa](5a24dfa)) * **grafana:** remove ([#107](#107)) ([960b978](960b978)) * **invitation:** add update metadata ([f493fe4](f493fe4)) * **invitation:** column names prefixed ([2e29431](2e29431)) * **invitation:** provide flattened invitations ([119b0dd](119b0dd)) * **policy:** add policy to recommendation tables ([280f47b](280f47b)) * **recommendation:** add enum and tables needed for event recommendation ([7fb5e21](7fb5e21)) * **recommendation:** several modifications to db schema ([8581ad0](8581ad0)) * **revert:** add revert for recommendation tables ([cff0b7f](cff0b7f)) * **schema:** fix small errors and build schema ([3183da0](3183da0)) * **table:** add creation timestamps ([d8d142d](d8d142d)) * **timestamp:** add time zone ([#92](#92)) ([d36d378](d36d378)) * **verify:** add verification for event recommendation tables ([1d6bb59](1d6bb59)) ### Bug Fixes * **account-block:** remove bug in function, create new table function ([#125](#125)) ([35b22b4](35b22b4)) * **build:** commit forgotten files ([d554d0f](d554d0f)) * **event-upload:** work in feedback ([678ddfc](678ddfc)) * **invitation-flat:** work in feedback ([6ac75ac](6ac75ac)) * **invoker-account-id:** grant execute for tusd ([#123](#123)) ([7245225](7245225)) * **legal-term-acceptance:** omit update and delete ([555e031](555e031)) * omit update for creation timestamps ([084ad1e](084ad1e)) * **policy:** fix user check in event category mapping policy ([3dfd96a](3dfd96a)) * **role:** drop before creation ([#106](#106)) ([fecd16e](fecd16e)) * schedule release ([6e32e10](6e32e10)) * schedule release ([7dbc9bb](7dbc9bb)) * **schema:** remove table prefix so schema can be build ([cc5be2d](cc5be2d))
🎉 This PR is included in version 5.0.0-beta.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
A new table
location
is created to accommodate location data of an account or an event based on GPS coordinates. The new function `distance' calculates the linear distance between two locations.