31
31
- [ Generators \& Parsers] ( #generators--parsers )
32
32
- [ Request Validation and Transformation] ( #request-validation-and-transformation )
33
33
- [ Interaction with the database] ( #interaction-with-the-database )
34
- - [ Example Setup] ( #example-setup )
35
- - [ Insert/Update] ( #insertupdate )
36
- - [ Insert/Update with different SRID] ( #insertupdate-with-different-srid )
37
- - [ Select] ( #select )
38
- - [ Using PostGIS functions in queries] ( #using-postgis-functions-in-queries )
39
- - [ Alias in select] ( #alias-in-select )
40
- - [ Geometry or Geography] ( #geometry-or-geography )
41
- - [ Autocast for BBox or geometries] ( #autocast-for-bbox-or-geometries )
34
+ - [ Example Setup] ( #example-setup )
35
+ - [ Insert/Update] ( #insertupdate )
36
+ - [ Insert/Update with different SRID] ( #insertupdate-with-different-srid )
37
+ - [ Select] ( #select )
38
+ - [ Using PostGIS functions in queries] ( #using-postgis-functions-in-queries )
39
+ - [ Alias in select] ( #alias-in-select )
40
+ - [ Geometry or Geography] ( #geometry-or-geography )
41
+ - [ Autocast for BBox or geometries] ( #autocast-for-bbox-or-geometries )
42
42
- [ Limitations] ( #limitations )
43
- - [ Database Name Prepending (Cross Database Connections)] ( #database-name-prepending-cross-database-connections )
43
+ - [ Database Name Prepending (Cross Database Connections)] ( #database-name-prepending-cross-database-connections )
44
44
- [ Testing] ( #testing )
45
45
- [ Changelog] ( #changelog )
46
46
- [ Contributing] ( #contributing )
49
49
- [ Credits] ( #credits )
50
50
- [ License] ( #license )
51
51
52
-
53
52
## Introduction
54
53
55
54
Every sailor needs a nice ship to travel the seven seas ⛵️
@@ -117,9 +116,7 @@ Please see [UPGRADING](UPGRADING.md) for details.
117
116
- [x] Geometry and BBox Cast classes
118
117
- [x] Auto Cast when using functions that return geometry or bbox
119
118
- [x] Empty Geometry Support
120
- - [ ] Custom update Builder method for conversion safety
121
119
- [ ] Automatic PostGIS Function Doc Generator
122
- - [ ] BBox support within $postgisColumns & trait (currently with cast only)
123
120
- [ ] Custom Geometry Factories & Models
124
121
- [ ] More tests
125
122
- ...
@@ -131,14 +128,27 @@ able to see everything included in the IDEs auto-completion.
131
128
132
129
## Creating Tables with PostGIS Columns
133
130
134
- Laravel-magellan extends the default Schema Blueprint with all PostGIS functions. Since Laravel has introduced basic
135
- geometry support, all methods are prefixed with ` magellan ` . e.g.
131
+ > [ !NOTE]
132
+ > Please use the new built-in Laravel methods ` geometry ` and ` geography ` where possible.
133
+ > Only the ` magellanBox2D ` , ` magellanBox3D ` , ` magellanGeometryCollection ` -functions are not deprecated.
134
+ > All other methods are deprecated and will be removed in the next major version.
135
+
136
+ Laravel-magellan extends the default Schema Blueprint with all PostGIS functions.
137
+ Since Laravel has introduced basic geometry support, all methods are prefixed with ` magellan ` . e.g.
136
138
137
139
``` php
140
+ // Deprecated, use the new Laravel methods instead ->geometry('location', 'POINT', 4326)
138
141
$table->magellanPoint('location', 4326);
139
- ```
140
142
141
- ![ List of all schema methods] ( art/magellan_schema.png )
143
+ // Special column types (not deprecated)
144
+ $table->magellanBox2D('bounds2d');
145
+ $table->magellanBox3D('bounds3d');
146
+ $table->magellanGeometryCollection('collection');
147
+ $table->magellanGeometryCollectionM('collection_m');
148
+ $table->magellanGeometryCollectionZ('collection_z');
149
+ $table->magellanGeometryCollectionZM('collection_zm');
150
+
151
+ ```
142
152
143
153
## Preparing the Model
144
154
0 commit comments