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

Support geometry columns via brick/geo #57

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

Conversation

calcinai
Copy link
Contributor

@calcinai calcinai commented Aug 9, 2024

This adds basic geometry support to the database via brick/geo

The main change (aside from storing the type on the field) is to allow arrays to be passed to the prepare methods, which can get unpacked into the optional params.

note. The $name+1 is due to the parameters expected to be 1-indexed.

@calcinai calcinai force-pushed the feature/database-geometry-type branch from 5025d75 to c41fe96 Compare August 9, 2024 03:36
@phindmarsh
Copy link
Member

Maybe we add automatic handling in Utils/JSON.php to convert the binary representation to the text WKT equivalent as a default?

@calcinai
Copy link
Contributor Author

calcinai commented Aug 9, 2024

Or just geoJSON 🤯

Can't use `bindParam` here because its by reference, and in the context of the loop every bound parameter has the value of whatever the last parameter in the loop was.

`bindValue` is not by reference, and still allows the type to be set separately.
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.

2 participants