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

MySQL Spatial Data Types #2735

Open
nik-here opened this issue Sep 5, 2023 · 2 comments
Open

MySQL Spatial Data Types #2735

nik-here opened this issue Sep 5, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nik-here
Copy link

nik-here commented Sep 5, 2023

Is your feature request related to a problem? Please describe.

Similar to #166 there are missing spatial types for MySQL.

Describe the solution you'd like

using the geo crate: https://crates.io/crates/geo

And add geo to the feature list in the Cargo.toml

Describe alternatives you've considered

Alternativly geo-types could be used.

Additional context

https://dev.mysql.com/doc/refman/8.1/en/spatial-types.html

@nik-here nik-here added the enhancement New feature or request label Sep 5, 2023
@mirromutth
Copy link

mirromutth commented Feb 22, 2024

I prefer to use geo-types, because geo::geometry::* is a re-export of geo_types::geometry::*.

An additional discussion is whether we need a wrapper structure (or a (Geometry<f64>, i32)) to handle SRID.

AFAIK, geo_types::Geometry and subtypes do not contain SRID. Since MySQL 8.0, MySQL server supports SRID for GEOMETRY types.

If wrapper structure is necessary, I prefer to support both native geo_types::Geometry and the wrapper, like json does.

@abonander
Copy link
Collaborator

Since geozero already provides integration with SQLx for PostGIS types, I think this should live there.

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

Successfully merging a pull request may close this issue.

3 participants