Skip to content

Commit 0c90f4e

Browse files
committed
Adding union, changing namespace (Breaking change).
1 parent f9c3f8d commit 0c90f4e

68 files changed

Lines changed: 264 additions & 156 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ in your PHP application.
4343

4444
```php
4545
use GeoJson\GeoJson;
46-
use willvincent\Turf\Turf;
46+
use Turf\Turf;
4747

4848
$featureCollection = GeoJson::jsonUnserialize(json_decode('
4949
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"LAX"},
@@ -74,7 +74,7 @@ $square_miles = Turf::area($featureCollection, 'miles');
7474
```php
7575
use GeoJson\Geometry\Point;
7676
use GeoJson\Geometry\Polygon;
77-
use willvincent\Turf\Turf;
77+
use Turf\Turf;
7878

7979
$point = new Point([-77, 44]);
8080
$polygon = new Polygon([
@@ -90,7 +90,7 @@ echo Turf::booleanPointInPolygon($point, $polygon) ? 'true' : 'false'; // Output
9090
use GeoJson\Feature\Feature;
9191
use GeoJson\Feature\FeatureCollection;
9292
use GeoJson\Geometry\Polygon;
93-
use willvincent\Turf\Turf;
93+
use Turf\Turf;
9494

9595
$polygon1 = new Polygon([
9696
[

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
"type": "library",
55
"require": {
66
"jmikola/geojson": "^1.0",
7-
"php": ">=8.2"
7+
"php": ">=8.2",
8+
"willvincent/polyclip": "^1.2"
89
},
910
"license": "MIT",
1011
"autoload": {
1112
"psr-4": {
12-
"willvincent\\Turf\\": "src/"
13+
"Turf\\": "src/"
1314
}
1415
},
1516
"authors": [

src/Enums/Unit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace willvincent\Turf\Enums;
3+
namespace Turf\Enums;
44

55
enum Unit: string
66
{

src/Packages/Along.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
namespace willvincent\Turf\Packages;
3+
namespace Turf\Packages;
44

55
use GeoJson\Feature\Feature;
66
use GeoJson\GeoJson;
77
use GeoJson\Geometry\LineString;
88
use GeoJson\Geometry\Point;
99
use InvalidArgumentException;
10-
use willvincent\Turf\Enums\Unit;
10+
use Turf\Enums\Unit;
1111

1212
class Along
1313
{

src/Packages/Angle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace willvincent\Turf\Packages;
3+
namespace Turf\Packages;
44

55
use InvalidArgumentException;
66

src/Packages/Area.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace willvincent\Turf\Packages;
5+
namespace Turf\Packages;
66

77
use GeoJson\GeoJson;
88
use InvalidArgumentException;
9-
use willvincent\Turf\Enums\Unit;
9+
use Turf\Enums\Unit;
1010

1111
class Area
1212
{

src/Packages/Bbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace willvincent\Turf\Packages;
3+
namespace Turf\Packages;
44

55
use GeoJson\Feature\Feature;
66
use GeoJson\Feature\FeatureCollection;

src/Packages/BboxClip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace willvincent\Turf\Packages;
3+
namespace Turf\Packages;
44

55
use GeoJson\Feature\Feature;
66
use GeoJson\GeoJson;

src/Packages/BboxPolygon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace willvincent\Turf\Packages;
3+
namespace Turf\Packages;
44

55
use GeoJson\Feature\Feature;
66
use GeoJson\Geometry\Polygon;

src/Packages/Bearing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace willvincent\Turf\Packages;
3+
namespace Turf\Packages;
44

55
class Bearing
66
{

0 commit comments

Comments
 (0)