Skip to content

Implement spatial interfaces and their geometric and geographic classes

License

Notifications You must be signed in to change notification settings

longitude-one/spatial-types

Repository files navigation

Spatial Types Library

Implement spatial PHP types and their geometric and geographic classes.

If you want to persist spatial data in a database, you should use the longitude-one/doctrine2-spatial package.

Current status

longitude-one/spatial--types Stable release Minimum PHP Version Packagist License

Last integration test Last integration test Maintainability Downloads Coverage Status

Installation

composer require longitude-one/spatial-types

Usage

use LongitudeOne\Spatial\Types\Geometry\Point;

$point = new Point(1, 2);
echo $point->getX(); // 1
echo $point->getY(); // 2

$lineString = new LineString([
    new Point(1, 2),
    new Point(3, 4),
    new Point(5, 6),
], 4326);
$lineString->getSrid(); // 4326

About

Implement spatial interfaces and their geometric and geographic classes

Resources

License

Stars

Watchers

Forks

Packages

No packages published