-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add geometry and geography from text Doctrine functions #23
base: master
Are you sure you want to change the base?
Conversation
Hi, they can be useful indeed, though Geography is PostGIS-specific, so I'm not comfortable with including this function in the library. I'd love to think about transparently supporting Geography first, as at the moment everything is calculated as a Geometry, and thus calculations with GPS coordinates cannot be performed in meters in PostGIS with brick/geo, AFAIK. I'm not sure how brick/geo could support geographies transparently. In MySQL it is simpler, as some SRIDs (4326) will make calculations happen in meters, whereas to get the same result, you have to use Geography in PostGIS instead, if I'm not mistaken. Maybe it would just be a matter on transparently using |
@BenMorel calculations can be performed in meters. You just have to convert at least one parameter of a calculation function to a For example if you pass some |
That's what I mean, brick/geo needs to explicitly use geographies ( PostGIS may be the only GIS engine that distinguishes between Geometry and Geography; MySQL has a single Geometry type, and whether the calculations are performed in meters depends on the SRID. Not sure about SpatiaLite & GEOS, I'd be interested to see how it's handled there. |
@BenMorel not sure. What is someone needs to use another SRID with geographies? |
Geographies imply using GPS coordinates, so there aren't many SRIDs that match. These could be hardcoded in the library to use Geographies instead of Geometries on PostGIS. I'm not sure this is the best idea though, I'm open to suggestions! |
Sorry, at this point I can not suggest any generic solution for that problem. In my project I solved it by manually casting geometries to geographies. |
3918a75
to
69e9bb2
Compare
e672ec6
to
47bdb4e
Compare
4f4bb6e
to
ce4503f
Compare
bcc19f3
to
0ba1296
Compare
I found myself using these functions extensively. They seem to be quite commonly used to me, that's why I wonder whether they can be included into the library.