NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1629 most downloaded on Packagist
GIS geometry library
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.2 years
Nearly every release is documented
notes for 31 of 31 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
31 releases · first in 2017
Uninitialized proxies would be broken when calling withRoundedCoordinates()
🐛 Bug fixes
withRoundedCoordinates()with*() proxy methods using variadic parameters were brokenThe following breaking changes will only affect you if you're writing your own geometry engine:
💥 Breaking changes
The case of the following class names and namespaces has changed:
GEOSEngine => GeosEnginePDOEngine => PdoEngineSQLite3Engine => Sqlite3EngineRemoveZMProjector => RemoveZmProjectorSRIDProjector => SridProjectorSwapXYProjector => SwapXyProjectorTIN => TinGeometryIOException => GeometryIoExceptionIO\EWKBReader => Io\EwkbReaderIO\EWKBWriter => Io\EwkbWriterIO\EWKTReader => Io\EwktReaderIO\EWKTWriter => Io\EwktWriterIO\WKBReader => Io\WkbReaderIO\WKBWriter => Io\WkbWriterIO\WKTReader => Io\WktReaderIO\WKTWriter => Io\WktWriterIO\GeoJSONReader => Io\GeoJsonReaderIO\GeoJSONWriter => Io\GeoJsonWriterIO\GeoJSON\Feature => Io\GeoJson\FeatureIO\GeoJSON\FeatureCollection => Io\GeoJson\FeatureCollectionThe following breaking changes will only affect you if you're writing your own geometry engine:
GeometryEngine interface has a new method: concaveHull()DatabaseEngine::executeQuery() implementations must now accept bool parametersDatabaseEngine::getParameterPlaceholder() signature has changed to accept bool parametersDatabaseEngine::queryGeometry() is now finalThe following breaking changes may only affect you if you're writing your own engine or geometry classes:
GeometryException constructor signature has changedGeometry has a new method: withRoundedCoordinates()✨ New features
GeosOpEngine uses the geosop binary to perform geometry operationsGeometryEngine::concaveHull()Geometry method: withRoundedCoordinates()✨ Improvements
GeometryEngine methods are now properly documented with @throws GeometryEngineException🐛 Bug fixes
WktParser and EwktParser now accept both MULTIPOINT (1 2, 3 4) and MULTIPOINT((1 2), (3 4)) syntaxes;One column per quarter.
💥 Breaking changes
The case of the following class names and namespaces has changed:
GEOSEngine => GeosEnginePDOEngine => PdoEngineSQLite3Engine => Sqlite3EngineRemoveZMProjector => RemoveZmProjectorSRIDProjector => SridProjectorSwapXYProjector => SwapXyProjectorTIN => TinGeometryIOException => GeometryIoExceptionIO\EWKBReader => Io\EwkbReaderIO\EWKBWriter => Io\EwkbWriterIO\EWKTReader => Io\EwktReaderIO\EWKTWriter => Io\EwktWriterIO\WKBReader => Io\WkbReaderIO\WKBWriter => Io\WkbWriterIO\WKTReader => Io\WktReaderIO\WKTWriter => Io\WktWriterIO\GeoJSONReader => Io\GeoJsonReaderIO\GeoJSONWriter => Io\GeoJsonWriterIO\GeoJSON\Feature => Io\GeoJson\FeatureIO\GeoJSON\FeatureCollection => Io\GeoJson\FeatureCollectionThe following breaking changes will only affect you if you're writing your own geometry engine:
GeometryEngine interface has a new method: concaveHull()DatabaseEngine::executeQuery() implementations must now accept bool parametersDatabaseEngine::getParameterPlaceholder() signature has changed to accept bool parametersDatabaseEngine::queryGeometry() is now finalThe following breaking changes may only affect you if you're writing your own engine or geometry classes:
GeometryException constructor signature has changedGeometry has a new method: withRoundedCoordinates()✨ New features
GeosOpEngine uses the geosop binary to perform geometry operationsGeometryEngine::concaveHull()Geometry method: withRoundedCoordinates()✨ Improvements
GeometryEngine methods are now properly documented with @throws GeometryEngineException🐛 Bug fixes
WktParser and EwktParser now accept both MULTIPOINT (1 2, 3 4) and MULTIPOINT((1 2), (3 4)) syntaxes;
this notably fixes interoperability issues with PostGISInterface GeometryEngine has 2 new methods: lineInterpolatePoint() , lineInterpolatePoints()
💥 Breaking changes
GeometryEngine has 2 new methods: lineInterpolatePoint(), lineInterpolatePoints()BoundingBox's constructor is now private, use BoundingBox::new() to create a new instanceCompoundCurve can now only contain LineString and CircularString instances; nested CompoundCurve instances are forbiddenGeometry no longer implements Countable and IteratorAggregate; subclasses implement these interfaces as needed, with proper typesSQLite3Exception class has been removedGeometryEngineException::operationNotSupportedByEngine() method has been removedfinal:
BoundingBoxCoordinateSystemGEOSEnginePDOEngineSQLite3EngineCoordinateSystemExceptionEmptyGeometryExceptionGeometryEngineExceptionGeometryIOExceptionInvalidGeometryExceptionNoSuchGeometryExceptionUnexpectedGeometryExceptionEWKBReaderEWKBWriterEWKTReaderEWKTWriterGeoJSONReaderGeoJSONWriterWKBReaderWKBWriterWKTReaderWKTWriter@internal, and are no longer part of the public API:
Attribute\NoProxyEngine\GeometryParameterIO\AbstractWKBReaderIO\AbstractWKBWriterIO\AbstractWKTReaderIO\AbstractWKTWriterIO\EWKBToolsIO\EWKTParserIO\WKBBufferIO\WKBByteOrderIO\WKBGeometryHeaderIO\WKBToolsIO\WKTParser🗑️ Deprecations
@final, and will be made final in a future version:
CircularStringCompoundCurveCurvePolygonLineStringMultiLineStringMultiPointMultiPolygonPointTINTriangle✨ New features
GeometryEngine::lineInterpolatePoint(), lineInterpolatePoints() (#55 by @arminwinkt)✨ Improvements
Geometry::toArray() methodsPDOEngine and SQLite3Engine now wrap all underlying exceptions in a GeometryEngineExceptionGeometryEngineException now includes the original exception messageThe error mode of the PDO connection in PDOEngine could be left modified when an exception occurs
🐛 Bug fixes
PDOEngine could be left modified when an exception occurswith*() methodsGeoJSONWriter erroneously refused to write MultiPoint , MultiLineString and MultiPolygon nested inside GeometryCollection
🐛 Bug fixes
GeoJSONWriter erroneously refused to write MultiPoint, MultiLineString and MultiPolygon nested inside GeometryCollection (#53)✨ New features
GeoJSONWriter constructor now has a $lenient flag to allow nested GeometryCollection objects✨ Improvements
GeoJSONReaderGeoJSONWriter when the bbox attribute is not requestedThe following methods have been added:
✨ New features
CircularString::withAddedPoints()CompoundCurve::withAddedCurves()CurvePolygon::withExteriorRing(), withInteriorRings(), withAddedInteriorRings()GeometryCollection::withAddedGeometries()LineString::withAddedPoints()Polygon::withExteriorRing(), withInteriorRings(), withAddedInteriorRings()PolyhedralSurface::withAddedPatches()extending an empty BoundingBox would get its immutability violated by setting a coordinate system
🐛 Bug fixes
BoundingBox would get its immutability violated by setting a coordinate systemNew projector: RoundCoordinatesProjector
✨ New features
RoundCoordinatesProjectorinterface GeometryEngine has a new method: split()
💥 Breaking changes
GeometryEngine has a new method: split()GeometryEngine::boundingPolygons() has been removed✨ New features
GeometryEngine::split()interface GeometryEngine has a new method: makeValid()
💥 Breaking changes
8.1GeometryEngine has a new method: makeValid()AbstractWKBWriter::setByteOrder() now accepts a WKBByteOrder enum instead of a WKBTools::*_ENDIAN constantWKBTools::BIG_ENDIAN and WKBTools::LITTLE_ENDIAN have been removedWKBTools::checkByteOrder() has been removed✨ New features
GeometryEngine::makeValid()Proxies are now @internal and considered an implementation detail. This means that they are no longer part of the public API and can change at any tim
💥 Breaking changes
@internal and considered an implementation detail. This means that they are no longer part of the public API and can change at any time. This means that you should always type-hint against the base class and not the proxy.Point constructor now throws an exception when passing NaN or infinite coordinates.GeometryEngine::pointOnSurface() now returns Point instead of Geometry.🐛 Bug fixes
Geometry::withSRID() now properly propagates the SRID to all sub-geometries. Previously, only the top-level geometry was updated.Point constructor would error when destructuring an associative array.✨ New features
Projector API to reproject geometry coordinates.Polygon::rings()Geometry::isIdenticalTo()✨ Improvements
GeometryCollection::geometryN() is now properly documented with generics.Better Psalm annotations for geometry getters
✨ Improvements
composer.jsonThe following signatures have changed, but are not a breaking change due to LSP:
💥 Breaking changes
Minimum PHP version is now 8.0.
The global GeometryEngineRegistry is gone. All convenience methods that rely on the GeometryEngineRegistry have been removed.
You should now explicitly call the GeometryEngine, that you can get injected with your dependency injection container.
For example, the following call:
$lineString->length();
Should be replaced with:
$geometryEngine->length($lineString);
Detail of breaking changes
The following class has been removed:
GeometryEngineRegistryThe following method has been added:
GeometryEngine::isRing()The following method signatures have been changed:
GeometryEngine::boundingPolygons()The following deprecated methods have been removed:
Curve::isClosed()Curve::isRing()Curve::length()Geometry::boundary()Geometry::buffer()Geometry::centroid()Geometry::contains()Geometry::convexHull()Geometry::crosses()Geometry::difference()Geometry::disjoint()Geometry::distance()Geometry::equals()Geometry::envelope()Geometry::intersection()Geometry::intersects()Geometry::isSimple()Geometry::isValid()Geometry::locateAlong()Geometry::locateBetween()Geometry::maxDistance()Geometry::overlaps()Geometry::relate()Geometry::simplify()Geometry::snapToGrid()Geometry::symDifference()Geometry::touches()Geometry::transform()Geometry::union()Geometry::within()MultiCurve::isClosed()MultiCurve::length()MultiSurface::area()MultiSurface::pointOnSurface()Point::azimuth()PolyhedralSurface::boundingPolygons()PolyhedralSurface::isClosed()Surface::area()Surface::pointOnSurface()The following change only affects you if you implement a custom DatabaseEngine:
DatabaseEngine::getParameterPlaceholder() has changed💥 Non-breaking changes
DatabaseEngine::getParameterPlaceholder(mixed $parameter): stringGeometryEngine::length(Curve|MultiCurve $g): floatGeometryEngine::area(Surface|MultiSurface $g): floatGeometryEngine::pointOnSurface(Surface|MultiSurface $g): Geometry🐛 Fixes
The `GeometryEngineRegistry` class has been deprecated. All convenience methods on Geometry classes that rely on the GeometryEngineRegistry are deprec…
🗑️ Deprecations
The GeometryEngineRegistry class has been deprecated. All convenience methods on Geometry classes that rely on the
GeometryEngineRegistry are deprecated, and will be removed in version 0.8.
You should now explicitly call the GeometryEngine, that you can get injected with your dependency injection container.
Deprecated methods:
Curve::isClosed()Curve::isRing()Curve::length()Geometry::boundary()Geometry::buffer()Geometry::centroid()Geometry::contains()Geometry::convexHull()Geometry::crosses()Geometry::difference()Geometry::disjoint()Geometry::distance()Geometry::equals()Geometry::envelope()Geometry::intersection()Geometry::intersects()Geometry::isSimple()Geometry::isValid()Geometry::locateAlong()Geometry::locateBetween()Geometry::maxDistance()Geometry::overlaps()Geometry::relate()Geometry::simplify()Geometry::snapToGrid()Geometry::symDifference()Geometry::touches()Geometry::transform()Geometry::union()Geometry::within()MultiCurve::isClosed()MultiCurve::length()MultiSurface::area()MultiSurface::pointOnSurface()Point::azimuth()PolyhedralSurface::boundingPolygons()PolyhedralSurface::isClosed()Surface::area()Surface::pointOnSurface()Fix a deprecation warning on PHP 8.1
🐛 Fixes
The Doctrine mapping types & functions have been moved to a separate package.
💥 Breaking change
The Doctrine mapping types & functions have been moved to a separate package.
If you don't use these, you don't need to do anything to upgrade.
If you use them, just require the brick/geo-doctrine package in addition to brick/geo.
Fixed bug when retrieving GeometryCollection on MySQL 8 using DatabaseEngine
🐛 Fixes
GeometryCollection on MySQL 8 using DatabaseEngine (#33)Fixed bug with PDO MySQL when using non-emulated prepared statements
🐛 Fixes
Proper support for `Feature` and `FeatureCollection` in `GeoJSONReader` and `GeoJSONWriter`
✨ New features
Feature and FeatureCollection in GeoJSONReader and GeoJSONWriterbbox attribute in GeoJSONWriterGeometry::transform() transforms Geometry coordinates to a new SRIDGeometry::toXY() returns a new Geometry with no Z and M coordinatesGeometry::withoutZ() returns a new Geometry with the Z coordinate removedGeometry::withoutM() returns a new Geometry with the M coordinate removedGeometry::getBoundingBox() returns the south-west and north-east bounds of a GeometryCoordinateSystem::isEqualTo() compares against another CoordinateSystem🐛 Fixes
✨ Improvements
DatabaseEngine💥 BC breaks
CoordinateSystemException::sridMix()CoordinateSystemException::dimensionalityMix()The following breaks only affect you if you use the GeoJSON reader/writer:
GeoJSONReader now instantiates Features and FeatureCollections as Feature and FeatureCollection objects, instead of Geometry and GeometryCollection objectsGeoJSONWriter will now write GeometryCollections as GeometryCollection type, instead of FeatureCollectionThe 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 new transform() methodProxyInterface has a new isProxyBinary() methodFixed bug with PDO MySQL when using non-emulated prepared statements
🐛 Fixes
Fixed illegal parameter data type issue on MariaDB
🐛 Fixes
💥 BC breaks
Note: these breaks will likely not affect you, unless you're writing your own geometry engine.
DatabaseEngine::$useProxy is now private, and must be provided through a parent constructor call.DatabaseEngine::executeQuery(), when provided with geometry data, now takes GeometryParameter objects instead of Geometry objects directly.New method Point::azimuth() (#17) thanks to @Kolyunya
✨ New features
Point::azimuth() (#17) thanks to @Kolyunyacentroid() is now available on the root Geometry class (#20) thanks to @Kolyunya🐛 Fixes
💥 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 an azimuth() methodGeometryEngine::centroid() now returns PointWKTParser / EWKTParser are now protectedWBKBuffer::readDoubles()'s $count parameter is now typeddeprecated Doctrine function EarthDistanceFunction has been removed
✨ New features
0.4💥 Breaking changes
EarthDistanceFunction has been removedEarth 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.
Doctrine function EarthDistanceFunction is now deprecated, and will be removed in `0.3.0`.
Deprecations
Doctrine function EarthDistanceFunction is now deprecated, and will be removed in 0.3.0.
Improvements
This version extends compatibility to brick/reflection version 0.3.
These methods return a copy of the original object, with the SRID altered.
New methods
Geometry::withSRID()CoordinateSystem::withSRID()These methods return a copy of the original object, with the SRID altered.
This methods returns a copy of the Geometry, with X and Y coordinates swapped. It is useful when needing to convert geometries from Lat, Lng to Lng, L
New method: Geometry::swapXY()
This methods returns a copy of the Geometry, with X and Y coordinates swapped. It is useful when needing to convert geometries from Lat, Lng to Lng, Lat and conversely.
Improvements to GeoJSON reader and writer classes:
Improvements to GeoJSON reader and writer classes:
GeoJSONReader can now be lenient with documents containing wrong case types, such as POINT instead of Point:$reader = new GeoJSONReader(true); // case-insensitive
GeoJSONWriter can now pretty-print the JSON output:$writer = new GeoJSONWriter(true); // pretty-print
This version adds support for importing from and exporting to GeoJSON:
This version adds support for importing from and exporting to GeoJSON:
Brick\Geo\IO\GeoJSONReaderBrick\Geo\IO\GeoJSONWriterThanks @michaelcurry 👍
Fixed a potential Error when an Exception is expected in WKBReader and EWKBReader.
Fixed a potential Error when an Exception is expected in WKBReader and EWKBReader.
Minimum PHP version is now 7.1.
Minimum PHP version is now 7.1.
First beta release.
First beta release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →