Comments (2)
I had to check this, but I encountered a lot of problems with this.
In any case this bug will be solved in next major version. In version 3.1 using parameters in constructor will throw deprecations and it will throw errors in next major version.
So, in next major version, you will have to use:
$lat = 52.092876;
$lon = 5.104480;
var_dump($lat, $lon);
$point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point();
$point->setLongitude($lon);
$point->setLatitude($lat);
var_dump($point->getLatitude(), $point->getLongitude());
from doctrine-spatial.
This is only an error in comments line 196 and 197. Constructor is longitude then latitude as in Postgis
- https://github.com/longitude-one/doctrine-spatial/blob/main/lib/LongitudeOne/Spatial/PHP/Types/AbstractPoint.php#L196
- https://github.com/longitude-one/doctrine-spatial/blob/main/lib/LongitudeOne/Spatial/PHP/Types/AbstractPoint.php#L197
- https://postgis.net/2013/08/18/tip_lon_lat/
This will be fix soon
from doctrine-spatial.
Related Issues (20)
- ST_GeomFromText is missing when using DBAL insert / update methods HOT 1
- Replacement of `creof/wkt-parser` to not depend on `doctrine/lexer:~1.0` HOT 13
- User Deprecated: AbstractMySQLPlatform::getName() HOT 5
- DBAL\Types\Geometry vs Geography HOT 1
- BC breaks upgrding doctrine/dbal from 3.6.x to 3.7.x. Undefined array key "type" ErrorException HOT 3
- Add support for doctrine/orm 3.0 HOT 21
- The dockerized sphinx-doc image creation process is failing
- Upgrade package `longitude-one/wkt-parser` HOT 1
- Remove the support of MySQL 5.7
- Hard-code the type (string) in AbstractPoint.php
- Quality: Mess detector: Remove the rule about LineLength
- [PostgreSQL] SpTransform function: Optional SRID is detected as a string
- Geometry SHOULD not have Longitude or Latitude
- [MySQL] SpDistanceSphere missed HOT 1
- Docker `service_doc` is broken
- GitHub actions: The `set-output` command is deprecated
- Point setX, setY should accept int and perhaps float HOT 1
- Longitude and latitude setters shouldn't accept out of range values
- First parameter of point constructor could be an array, but arguments of this array aren't count.
- Introduction of Point3D and Point4D: Geometric 2D points shall only accepts three arguments: $x, $y and optional $srid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrine-spatial.