Skip to content
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

[Pg] Add implementation of geography type for PostGIS extension #3021

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

robinsimonklein
Copy link

@robinsimonklein robinsimonklein commented Sep 28, 2024

For now, as mentioned here, Drizzle ORM only has basic support for the PostGIS extension, with only the geometry column type available. PostGIS also offers a geography column type, which is often more suitable for storing real-world location coordinates because it uses the Earth's spherical representation for calculations.

This is a first attempt to implement the geography type, based on the current implementation of geometry. Both types work similarly, with the following differences:

  • The srid parameter has been removed, as the geography type only works with SRID 4326.
  • xy mode has been renamed to json, and x and y have been replaced with lon and lat, which makes more sense for geographic coordinates.

@ImBoop
Copy link

ImBoop commented Oct 25, 2024

Hope this gets approval, having geometry but not geography is a weird choice. Good work!

@eaoliver
Copy link

Thanks for this. Any intel on what the PR will make it into main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants