brick / geo

GIS geometry library for PHP
MIT License
221 stars 31 forks source link

Add azimuth function #17

Closed Kolyunya closed 3 years ago

Kolyunya commented 3 years ago

Added azimuth function implemented by PostGIS.

There are couple of things to discuss:

Kolyunya commented 3 years ago

@BenMorel I've fixed the points you've mentioned and added a couple of things to discuss to the PR description.

BenMorel commented 3 years ago

Thanks! :+1: Expect a release soon. Regarding your bullet points:

SpatiaLite support. The docs say that it's supported but requires some additional modules. Are we going to enable it in the tests?

I couldn't find a way to check if a given module is enabled, so I guess we'll have to skip it for now. It would be a great addition though, if we could somehow detect the presence of the module in SpatiaLite tests, and skip the test otherwise.

I'm not quite sure about the purpose of the Brick\Geo\Doctrine\Functions class hierarchy but added a corresponding class just in case. Could you please clarify this point?

These are DQL functions for the Doctrine ORM; I'm not sure if all supported functions currently have a matching DQL function, but I appreciate that you added one anyway.

Observation subject vs object. The terminology is tricky here. From the grammar point of view it should be the latter but people most often use the former.

I trust your judgment!

BenMorel commented 3 years ago

Forgot to ask one question: are you sure Azimuth is part of the OpenGIS standard? Do you have a link?

Kolyunya commented 3 years ago

@BenMorel seems like it's not... It's a PostGIS extension. Still very useful IMO. Gonna make a PR with documentation adjustment...

Kolyunya commented 3 years ago

Thanks! +1 Expect a release soon.

Thank you! Really enjoy using your library.