Releases: brick/geo
0.6.1
0.5.1
0.6.0
✨ New features
- Proper support for
Feature
andFeatureCollection
inGeoJSONReader
andGeoJSONWriter
- Support for auto-calculating the
bbox
attribute inGeoJSONWriter
- New method:
Geometry::transform()
transformsGeometry
coordinates to a new SRID - New method:
Geometry::toXY()
returns a newGeometry
with noZ
andM
coordinates - New method:
Geometry::withoutZ()
returns a newGeometry
with theZ
coordinate removed - New method:
Geometry::withoutM()
returns a newGeometry
with theM
coordinate removed - New method:
Geometry::getBoundingBox()
returns the south-west and north-east bounds of a Geometry - New method:
CoordinateSystem::isEqualTo()
compares against anotherCoordinateSystem
🐛 Fixes
- Doctrine types could hydrate a parent Geometry proxy class, but now hydrate the correct Geometry proxy sub-class by introspecting the WKB without fully loading it
✨ Improvements
- Proxy data is now always sent as is to the
DatabaseEngine
💥 BC breaks
- Minimum PHP version is now 7.4
- New signature for
CoordinateSystemException::sridMix()
- New signature for
CoordinateSystemException::dimensionalityMix()
The following breaks only affect you if you use the GeoJSON reader/writer:
GeoJSONReader
now instantiates Features and FeatureCollections asFeature
andFeatureCollection
objects, instead ofGeometry
andGeometryCollection
objectsGeoJSONWriter
will now write GeometryCollections asGeometryCollection
type, instead ofFeatureCollection
The following breaks will only affect you if you're writing your own geometry engine, or your own WKB reader:
AbstractWKBReader::readGeometryHeader()
signature was changedWKBReader::read()
signature was changedGeometryEngine
has a newtransform()
methodProxyInterface
has a newisProxyBinary()
method
0.5.0
🐛 Fixes
- Fixed illegal parameter data type issue on MariaDB
💥 BC breaks
Note: these breaks will likely not affect you, unless you're writing your own geometry engine.
DatabaseEngine::$useProxy
is nowprivate
, and must be provided through a parent constructor call.DatabaseEngine::executeQuery()
, when provided with geometry data, now takesGeometryParameter
objects instead ofGeometry
objects directly.
0.4.0
✨ New features
- New method
Point::azimuth()
(#17) thanks to @Kolyunya centroid()
is now available on the rootGeometry
class (#20) thanks to @Kolyunya- Psalm annotations on the whole codebase
🐛 Fixes
- Fixed wrongly documented return types
💥 BC breaks
Note: these breaks will likely not affect you, unless you're writing your own geometry engine or WK(B|T) parser.
GeometryEngine
interface adds anazimuth()
methodGeometryEngine::centroid()
now returnsPoint
- constants in
WKTParser
/EWKTParser
are nowprotected
WBKBuffer::readDoubles()
's$count
parameter is now typed
0.3.0
✨ New features
- compatibility with PHP 8
- compatibility with brick/reflection
0.4
💥 Breaking changes
- minimum PHP version is now 7.2
- deprecated Doctrine function
EarthDistanceFunction
has been removed
Earth distance calculations should be delegated to the geometry engine, that should be able to handle geographic computations; MySQL 8, for example, supports calculating distances in meters between two SRID 4326 points.
0.2.6
0.2.5
0.2.4
0.2.3
Improvements to GeoJSON reader and writer classes:
GeoJSONReader
can now be lenient with documents containing wrong case types, such asPOINT
instead ofPoint
:
$reader = new GeoJSONReader(true); // case-insensitive
GeoJSONWriter
can now pretty-print the JSON output:
$writer = new GeoJSONWriter(true); // pretty-print