├── .codeclimate.yml
├── .coveralls.yml
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── INSTALL.md
├── LICENSE
├── README.md
├── TODO.md
├── composer.json
├── doc
├── common.md
├── common
│ ├── GeometryType.md
│ ├── ST_Area.md
│ ├── ST_AsBinary.md
│ ├── ST_AsText.md
│ ├── ST_Buffer.md
│ ├── ST_Centroid.md
│ ├── ST_Contains.md
│ ├── ST_ConvexHull.md
│ ├── ST_Crosses.md
│ ├── ST_Difference.md
│ ├── ST_Dimension.md
│ ├── ST_Disjoint.md
│ ├── ST_Distance.md
│ ├── ST_EndPoint.md
│ ├── ST_Envelope.md
│ ├── ST_Equals.md
│ ├── ST_ExteriorRing.md
│ ├── ST_GeoHash.md
│ ├── ST_GeomCollFromText.md
│ ├── ST_GeomFromGeoJSON.md
│ ├── ST_GeomFromText.md
│ ├── ST_GeomFromWKB.md
│ ├── ST_GeometryN.md
│ ├── ST_InteriorRingN.md
│ ├── ST_Intersection.md
│ ├── ST_Intersects.md
│ ├── ST_IsClosed.md
│ ├── ST_IsEmpty.md
│ ├── ST_IsSimple.md
│ ├── ST_IsValid.md
│ ├── ST_Length.md
│ ├── ST_LineFromText.md
│ ├── ST_LineFromWKB.md
│ ├── ST_MLineFromText.md
│ ├── ST_MLineFromWKB.md
│ ├── ST_MPointFromText.md
│ ├── ST_MPointFromWKB.md
│ ├── ST_MPolyFromText.md
│ ├── ST_MPolyFromWKB.md
│ ├── ST_MakeEnvelope.md
│ ├── ST_NumGeometries.md
│ ├── ST_NumInteriorRing.md
│ ├── ST_NumPoints.md
│ ├── ST_Overlaps.md
│ ├── ST_PointFromGeoHash.md
│ ├── ST_PointFromText.md
│ ├── ST_PointFromWKB.md
│ ├── ST_PointN.md
│ ├── ST_PolyFromText.md
│ ├── ST_PolyFromWKB.md
│ ├── ST_SRID.md
│ ├── ST_StartPoint.md
│ ├── ST_SymDifference.md
│ ├── ST_Touches.md
│ ├── ST_Union.md
│ ├── ST_Within.md
│ ├── ST_X.md
│ └── ST_Y.md
├── configuration.md
├── index.md
├── install.md
├── mysql.md
└── postgresql.md
├── lib
└── CrEOF
│ └── Spatial
│ ├── DBAL
│ ├── Platform
│ │ ├── AbstractPlatform.php
│ │ ├── MySql.php
│ │ ├── PlatformInterface.php
│ │ └── PostgreSql.php
│ └── Types
│ │ ├── AbstractSpatialType.php
│ │ ├── Geography
│ │ ├── LineStringType.php
│ │ ├── PointType.php
│ │ └── PolygonType.php
│ │ ├── GeographyType.php
│ │ ├── Geometry
│ │ ├── LineStringType.php
│ │ ├── MultiPolygonType.php
│ │ ├── PointType.php
│ │ └── PolygonType.php
│ │ └── GeometryType.php
│ ├── Exception
│ ├── InvalidValueException.php
│ └── UnsupportedPlatformException.php
│ ├── ORM
│ └── Query
│ │ ├── AST
│ │ └── Functions
│ │ │ ├── AbstractSpatialDQLFunction.php
│ │ │ ├── MySql
│ │ │ ├── Area.php
│ │ │ ├── AsBinary.php
│ │ │ ├── AsText.php
│ │ │ ├── Buffer.php
│ │ │ ├── Centroid.php
│ │ │ ├── Contains.php
│ │ │ ├── Crosses.php
│ │ │ ├── Dimension.php
│ │ │ ├── Disjoint.php
│ │ │ ├── Distance.php
│ │ │ ├── DistanceFromMultyLine.php
│ │ │ ├── EndPoint.php
│ │ │ ├── Envelope.php
│ │ │ ├── Equals.php
│ │ │ ├── ExteriorRing.php
│ │ │ ├── GLength.php
│ │ │ ├── GeodistPt.php
│ │ │ ├── GeomFromText.php
│ │ │ ├── GeometryType.php
│ │ │ ├── InteriorRingN.php
│ │ │ ├── Intersects.php
│ │ │ ├── IsClosed.php
│ │ │ ├── IsEmpty.php
│ │ │ ├── IsSimple.php
│ │ │ ├── LineString.php
│ │ │ ├── LineStringFromWKB.php
│ │ │ ├── MBRContains.php
│ │ │ ├── MBRDisjoint.php
│ │ │ ├── MBREqual.php
│ │ │ ├── MBRIntersects.php
│ │ │ ├── MBROverlaps.php
│ │ │ ├── MBRTouches.php
│ │ │ ├── MBRWithin.php
│ │ │ ├── NumInteriorRings.php
│ │ │ ├── NumPoints.php
│ │ │ ├── Overlaps.php
│ │ │ ├── Point.php
│ │ │ ├── PointFromWKB.php
│ │ │ ├── PointN.php
│ │ │ ├── SRID.php
│ │ │ ├── STBuffer.php
│ │ │ ├── STContains.php
│ │ │ ├── STCrosses.php
│ │ │ ├── STDisjoint.php
│ │ │ ├── STDistance.php
│ │ │ ├── STDistanceSphere.php
│ │ │ ├── STEquals.php
│ │ │ ├── STGeomFromText
│ │ │ ├── STGeomFromText.php
│ │ │ ├── STIntersects.php
│ │ │ ├── STOverlaps.php
│ │ │ ├── STTouches.php
│ │ │ ├── STWithin.php
│ │ │ ├── StartPoint.php
│ │ │ ├── Touches.php
│ │ │ ├── Within.php
│ │ │ ├── X.php
│ │ │ └── Y.php
│ │ │ ├── PostgreSql
│ │ │ ├── Geometry.php
│ │ │ ├── STArea.php
│ │ │ ├── STAsBinary.php
│ │ │ ├── STAsGeoJson.php
│ │ │ ├── STAsText.php
│ │ │ ├── STAzimuth.php
│ │ │ ├── STBoundary.php
│ │ │ ├── STBuffer.php
│ │ │ ├── STCentroid.php
│ │ │ ├── STClosestPoint.php
│ │ │ ├── STCollect.php
│ │ │ ├── STContains.php
│ │ │ ├── STContainsProperly.php
│ │ │ ├── STCoveredBy.php
│ │ │ ├── STCovers.php
│ │ │ ├── STCrosses.php
│ │ │ ├── STDWithin.php
│ │ │ ├── STDifference.php
│ │ │ ├── STDisjoint.php
│ │ │ ├── STDistance.php
│ │ │ ├── STDistanceSphere.php
│ │ │ ├── STEndPoint.php
│ │ │ ├── STEnvelope.php
│ │ │ ├── STExpand.php
│ │ │ ├── STExtent.php
│ │ │ ├── STGeographyFromText.php
│ │ │ ├── STGeomFromEWKT.php
│ │ │ ├── STGeomFromText.php
│ │ │ ├── STGeometryN.php
│ │ │ ├── STIntersection.php
│ │ │ ├── STIntersects.php
│ │ │ ├── STLength.php
│ │ │ ├── STLineCrossingDirection.php
│ │ │ ├── STLineInterpolatePoint.php
│ │ │ ├── STLineLocatePoint.php
│ │ │ ├── STLineSubstring.php
│ │ │ ├── STMakeBox2D.php
│ │ │ ├── STMakeEnvelope.php
│ │ │ ├── STMakeLine.php
│ │ │ ├── STMakePoint.php
│ │ │ ├── STOverlaps.php
│ │ │ ├── STPerimeter.php
│ │ │ ├── STPoint.php
│ │ │ ├── STScale.php
│ │ │ ├── STSetSRID.php
│ │ │ ├── STSimplify.php
│ │ │ ├── STSnapToGrid.php
│ │ │ ├── STSplit.php
│ │ │ ├── STStartPoint.php
│ │ │ ├── STSummary.php
│ │ │ ├── STTouches.php
│ │ │ ├── STTransform.php
│ │ │ ├── STTranslate.php
│ │ │ ├── STUnion.php
│ │ │ ├── STWithin.php
│ │ │ ├── STX.php
│ │ │ └── STY.php
│ │ │ └── ReturnsGeometryInterface.php
│ │ └── GeometryWalker.php
│ └── PHP
│ └── Types
│ ├── AbstractGeometry.php
│ ├── AbstractLineString.php
│ ├── AbstractMultiLineString.php
│ ├── AbstractMultiPoint.php
│ ├── AbstractMultiPolygon.php
│ ├── AbstractPoint.php
│ ├── AbstractPolygon.php
│ ├── Geography
│ ├── GeographyInterface.php
│ ├── LineString.php
│ ├── Point.php
│ └── Polygon.php
│ └── Geometry
│ ├── GeometryInterface.php
│ ├── LineString.php
│ ├── MultiLineString.php
│ ├── MultiPoint.php
│ ├── MultiPolygon.php
│ ├── Point.php
│ └── Polygon.php
├── phpunit.xml.dist
└── tests
├── CrEOF
└── Spatial
│ └── Tests
│ ├── DBAL
│ ├── Platform
│ │ └── PlatformTest.php
│ └── Types
│ │ ├── Geography
│ │ ├── GeoPointSridTest.php
│ │ └── GeoPolygonTypeTest.php
│ │ ├── GeographyTypeTest.php
│ │ ├── Geometry
│ │ ├── LineStringTypeTest.php
│ │ ├── MultiPolygonTypeTest.php
│ │ ├── PointTypeTest.php
│ │ └── PolygonTypeTest.php
│ │ ├── GeometryTypeTest.php
│ │ └── SchemaTest.php
│ ├── FileSQLLogger.php
│ ├── Fixtures
│ ├── GeoLineStringEntity.php
│ ├── GeoPointSridEntity.php
│ ├── GeoPolygonEntity.php
│ ├── GeographyEntity.php
│ ├── GeometryEntity.php
│ ├── LineStringEntity.php
│ ├── MultiPolygonEntity.php
│ ├── NoHintGeometryEntity.php
│ ├── PointEntity.php
│ └── PolygonEntity.php
│ ├── ORM
│ └── Query
│ │ ├── AST
│ │ └── Functions
│ │ │ ├── MySql
│ │ │ ├── AreaTest.php
│ │ │ ├── AsBinaryTest.php
│ │ │ ├── AsTextTest.php
│ │ │ ├── ContainsTest.php
│ │ │ ├── DisjointTest.php
│ │ │ ├── EnvelopeTest.php
│ │ │ ├── GLengthTest.php
│ │ │ ├── GeomFromTextTest.php
│ │ │ ├── MBRContainsTest.php
│ │ │ ├── MBRDisjointTest.php
│ │ │ ├── STDistanceSphereTest.php
│ │ │ ├── STDistanceTest.php
│ │ │ ├── STGeomFromTextTest.php
│ │ │ └── StartPointTest.php
│ │ │ └── PostgreSql
│ │ │ ├── GeometryTest.php
│ │ │ ├── STAreaTest.php
│ │ │ ├── STAsBinaryTest.php
│ │ │ ├── STAsTextTest.php
│ │ │ ├── STCentroidTest.php
│ │ │ ├── STClosestPointTest.php
│ │ │ ├── STCollectTest.php
│ │ │ ├── STContainsProperlyTest.php
│ │ │ ├── STContainsTest.php
│ │ │ ├── STCoveredByTest.php
│ │ │ ├── STCoversTest.php
│ │ │ ├── STCrossesTest.php
│ │ │ ├── STDisjointTest.php
│ │ │ ├── STDistanceSphereTest.php
│ │ │ ├── STDistanceTest.php
│ │ │ ├── STEnvelopeTest.php
│ │ │ ├── STGeomFromTextTest.php
│ │ │ ├── STLengthTest.php
│ │ │ ├── STLineCrossingDirectionTest.php
│ │ │ ├── STMakeEnvelopeTest.php
│ │ │ ├── STOverlapsTest.php
│ │ │ ├── STSnapToGridTest.php
│ │ │ ├── STStartPointTest.php
│ │ │ └── STSummaryTest.php
│ │ ├── GeometryWalkerTest.php
│ │ └── WrappingTest.php
│ ├── OrmMockTestCase.php
│ ├── OrmTestCase.php
│ ├── PHP
│ └── Types
│ │ ├── Geography
│ │ └── PointTest.php
│ │ └── Geometry
│ │ ├── LineStringTest.php
│ │ ├── MultiLineStringTest.php
│ │ ├── MultiPointTest.php
│ │ ├── MultiPolygonTest.php
│ │ ├── PointTest.php
│ │ └── PolygonTest.php
│ └── TestInit.php
└── travis
├── composer.orm2.3.json
├── composer.orm2.4.json
├── composer.orm2.5.json
├── travis.mysql.xml
└── travis.pgsql.xml
/.codeclimate.yml:
--------------------------------------------------------------------------------
1 | engines:
2 | phpcodesniffer:
3 | enabled: true
4 | phpmd:
5 | enabled: true
6 | fixme:
7 | enabled: true
8 | ratings:
9 | paths:
10 | - "**.php"
11 | exclude_paths: []
12 |
--------------------------------------------------------------------------------
/.coveralls.yml:
--------------------------------------------------------------------------------
1 | coverage_clover: ./build/logs/clover.xml
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 | composer.lock*
3 | doctrine2-spatial.iml
4 | .idea*
5 | .idea/*
6 | /nbproject
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | sudo: false
4 |
5 | php:
6 | - 5.4
7 | - 5.5
8 | - 5.6
9 | - 7.0
10 | - 7.1
11 | - 7.2
12 | - hhvm
13 |
14 | env:
15 | - ORM=2.3
16 | - ORM=2.4
17 | - ORM=2.5
18 |
19 | addons:
20 | postgresql: 9.6
21 | apt:
22 | packages:
23 | - postgresql-9.6-postgis-2.3
24 |
25 |
26 | before_script:
27 | - composer self-update
28 | - cp ./tests/travis/composer.orm$ORM.json ./composer.json
29 | - composer install --prefer-source
30 | - mkdir -p ./build/coverage
31 |
32 | script:
33 | - ./vendor/bin/phpunit -v -c ./tests/travis/travis.pgsql.xml --coverage-php ./build/coverage/coverage-pgsql-$TRAVIS_PHP_VERSION-$ORM.cov
34 | - ./vendor/bin/phpunit -v -c ./tests/travis/travis.mysql.xml --coverage-php ./build/coverage/coverage-mysql-$TRAVIS_PHP_VERSION-$ORM.cov
35 |
36 | after_script:
37 | - ./vendor/bin/phpcov merge --clover ./build/logs/clover.xml ./build/coverage
38 | - ./vendor/bin/coveralls -v --exclude-no-stmt
39 |
40 | notifications:
41 | webhooks: https://coveralls.io/webhook?repo_token=$COVERALLS_WEBHOOK
42 |
43 | matrix:
44 | allow_failures:
45 | - php: hhvm # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
46 | exclude:
47 | - php: 5.3
48 | env: ORM=2.5 # ORM >=2.5 requires PHP >=5.4
49 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | (this is a work in progress)
2 |
3 | - Code formatting MUST follow PSR-2.
4 | - Issues SHOULD include code and/or data to reproduce the issue.
5 | - PR's for issues SHOULD include test(s) for issue.
6 | - PR's SHOULD have adequate documentation (commit messages, comments, etc.) to readily convey what and/or why.
7 | - Code SHOULD attempt to follow [Object Calisthenics](http://www.xpteam.com/jeff/writings/objectcalisthenics.rtf) methodology.
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2012-2015 Derek J. Lambert
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Doctrine2-Spatial
2 |
3 | [](https://travis-ci.org/creof/doctrine2-spatial)
4 | [](https://codeclimate.com/github/creof/doctrine2-spatial)
5 | [](https://coveralls.io/github/creof/doctrine2-spatial?branch=master)
6 | [](https://packagist.org/packages/creof/doctrine2-spatial)
7 | [](https://gitter.im/creof/doctrine2-spatial)
8 |
9 |
10 | Doctrine2 multi-platform support for spatial types and functions. Currently MySQL and PostgreSQL with PostGIS are supported. Could potentially add support for other platforms if an interest is expressed.
11 |
12 | Documentation can be found at [here](./doc/index.md)
13 |
14 | ## composer.json
15 | ```javascript
16 | {
17 | "require": {
18 | ...
19 | "creof/doctrine2-spatial": "~1"
20 | ```
21 |
22 | You will also have to change the version requirement of doctrine to at least 2.3:
23 | ```javascript
24 |
25 | "doctrine/orm": ">=2.3",
26 | ```
27 |
--------------------------------------------------------------------------------
/TODO.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/TODO.md
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "creof/doctrine2-spatial",
3 | "type": "library",
4 | "description": "Doctrine2 multi-platform support for spatial types and functions",
5 | "keywords": ["orm", "dbal", "database", "postgresql", "mysql", "opengis", "postgis", "gis", "spatial", "geometry", "geography"],
6 | "authors": [
7 | {
8 | "name": "Derek Lambert",
9 | "email": "dlambert@dereklambert.com"
10 | }
11 | ],
12 | "license": "MIT",
13 | "require": {
14 | "doctrine/orm": ">=2.3",
15 | "creof/geo-parser": "~2.0",
16 | "creof/wkt-parser": "~2.0",
17 | "creof/wkb-parser": "~2.0"
18 | },
19 | "require-dev": {
20 | "phpunit/phpunit": "<5.0",
21 | "phpunit/phpcov": "*",
22 | "satooshi/php-coveralls": "~1.0"
23 | },
24 | "autoload": {
25 | "psr-0": {
26 | "CrEOF\\Spatial": "lib/"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/doc/common/GeometryType.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/GeometryType.md
--------------------------------------------------------------------------------
/doc/common/ST_Area.md:
--------------------------------------------------------------------------------
1 | # ST_Area
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_AsBinary.md:
--------------------------------------------------------------------------------
1 | # ST_AsBinary
2 |
3 | bytea ST_AsBinary(geometry g1);
4 |
5 | bytea ST_AsBinary(geometry g1, text NDR_or_XDR);
6 |
7 | bytea ST_AsBinary(geography geog);
8 |
9 | bytea ST_AsBinary(geography geog, text NDR_or_XDR);
10 |
11 | Example:
12 |
13 | ```php
14 | $queryBuilder = $manager->createQueryBuilder();
15 | $queryBuilder
16 | ->select("id, ST_Area(things.geometry) as area")
17 | ->from("geometryOfThings", "things");
18 | $results = $queryBuilder->getQuery()->getResult();
19 | ```
20 |
--------------------------------------------------------------------------------
/doc/common/ST_AsText.md:
--------------------------------------------------------------------------------
1 | # ST_AsText
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_Buffer.md:
--------------------------------------------------------------------------------
1 | # ST_Buffer
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_Centroid.md:
--------------------------------------------------------------------------------
1 | # ST_Centroid
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_Contains.md:
--------------------------------------------------------------------------------
1 | # ST_Contains
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_ConvexHull.md:
--------------------------------------------------------------------------------
1 | # ST_ConvexHull
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_Crosses.md:
--------------------------------------------------------------------------------
1 | # ST_Crosses
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/common/ST_Difference.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Difference.md
--------------------------------------------------------------------------------
/doc/common/ST_Dimension.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Dimension.md
--------------------------------------------------------------------------------
/doc/common/ST_Disjoint.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Disjoint.md
--------------------------------------------------------------------------------
/doc/common/ST_Distance.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Distance.md
--------------------------------------------------------------------------------
/doc/common/ST_EndPoint.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_EndPoint.md
--------------------------------------------------------------------------------
/doc/common/ST_Envelope.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Envelope.md
--------------------------------------------------------------------------------
/doc/common/ST_Equals.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Equals.md
--------------------------------------------------------------------------------
/doc/common/ST_ExteriorRing.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_ExteriorRing.md
--------------------------------------------------------------------------------
/doc/common/ST_GeoHash.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_GeoHash.md
--------------------------------------------------------------------------------
/doc/common/ST_GeomCollFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_GeomCollFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_GeomFromGeoJSON.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_GeomFromGeoJSON.md
--------------------------------------------------------------------------------
/doc/common/ST_GeomFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_GeomFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_GeomFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_GeomFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_GeometryN.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_GeometryN.md
--------------------------------------------------------------------------------
/doc/common/ST_InteriorRingN.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_InteriorRingN.md
--------------------------------------------------------------------------------
/doc/common/ST_Intersection.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Intersection.md
--------------------------------------------------------------------------------
/doc/common/ST_Intersects.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Intersects.md
--------------------------------------------------------------------------------
/doc/common/ST_IsClosed.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_IsClosed.md
--------------------------------------------------------------------------------
/doc/common/ST_IsEmpty.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_IsEmpty.md
--------------------------------------------------------------------------------
/doc/common/ST_IsSimple.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_IsSimple.md
--------------------------------------------------------------------------------
/doc/common/ST_IsValid.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_IsValid.md
--------------------------------------------------------------------------------
/doc/common/ST_Length.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Length.md
--------------------------------------------------------------------------------
/doc/common/ST_LineFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_LineFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_LineFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_LineFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_MLineFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MLineFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_MLineFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MLineFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_MPointFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MPointFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_MPointFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MPointFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_MPolyFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MPolyFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_MPolyFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MPolyFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_MakeEnvelope.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_MakeEnvelope.md
--------------------------------------------------------------------------------
/doc/common/ST_NumGeometries.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_NumGeometries.md
--------------------------------------------------------------------------------
/doc/common/ST_NumInteriorRing.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_NumInteriorRing.md
--------------------------------------------------------------------------------
/doc/common/ST_NumPoints.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_NumPoints.md
--------------------------------------------------------------------------------
/doc/common/ST_Overlaps.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Overlaps.md
--------------------------------------------------------------------------------
/doc/common/ST_PointFromGeoHash.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_PointFromGeoHash.md
--------------------------------------------------------------------------------
/doc/common/ST_PointFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_PointFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_PointFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_PointFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_PointN.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_PointN.md
--------------------------------------------------------------------------------
/doc/common/ST_PolyFromText.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_PolyFromText.md
--------------------------------------------------------------------------------
/doc/common/ST_PolyFromWKB.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_PolyFromWKB.md
--------------------------------------------------------------------------------
/doc/common/ST_SRID.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_SRID.md
--------------------------------------------------------------------------------
/doc/common/ST_StartPoint.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_StartPoint.md
--------------------------------------------------------------------------------
/doc/common/ST_SymDifference.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_SymDifference.md
--------------------------------------------------------------------------------
/doc/common/ST_Touches.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Touches.md
--------------------------------------------------------------------------------
/doc/common/ST_Union.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Union.md
--------------------------------------------------------------------------------
/doc/common/ST_Within.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_Within.md
--------------------------------------------------------------------------------
/doc/common/ST_X.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/creof/doctrine2-spatial/99be6ec4925cfc404a501471d88c54d8dac5302f/doc/common/ST_X.md
--------------------------------------------------------------------------------
/doc/common/ST_Y.md:
--------------------------------------------------------------------------------
1 | # ST_Y
2 |
3 | float ST_Area(geometry g1);
4 |
5 | float ST_Area(geography geog, boolean use_spheroid=true);
6 |
7 | Example:
8 |
9 | ```php
10 | $queryBuilder = $manager->createQueryBuilder();
11 | $queryBuilder
12 | ->select("id, ST_Area(things.geometry) as area")
13 | ->from("geometryOfThings", "things");
14 | $results = $queryBuilder->getQuery()->getResult();
15 | ```
16 |
--------------------------------------------------------------------------------
/doc/configuration.md:
--------------------------------------------------------------------------------
1 | # Configuration
2 | Add the types and functions you need to your Symfony configuration file. The doctrine type names are not hardcoded.
3 |
4 | doctrine:
5 | dbal:
6 | types:
7 | geometry: CrEOF\Spatial\DBAL\Types\GeometryType
8 | point: CrEOF\Spatial\DBAL\Types\Geometry\PointType
9 | polygon: CrEOF\Spatial\DBAL\Types\Geometry\PolygonType
10 | linestring: CrEOF\Spatial\DBAL\Types\Geometry\LineStringType
11 |
12 | orm:
13 | dql:
14 | numeric_functions:
15 | st_contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STContains
16 | contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Contains
17 | st_area: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Area
18 | st_geomfromtext: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeomFromText
19 | st_intersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STIntersects
20 | st_buffer: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STBuffer
21 | point: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Point
22 |
--------------------------------------------------------------------------------
/doc/install.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | ## Setup/Installation
4 |
5 | Use these instructions if you're using Doctrine with Symfony2 , otherwise the OrmTest.php test class shows their use with Doctrine alone.
6 |
7 | Require the `CrEOF/doctrine2-spatial` package in your composer.json and update
8 | your dependencies.
9 |
10 | $ composer require CrEOF/doctrine2-spatial
11 |
12 | ## composer.json
13 |
14 | "require": {
15 | ...
16 | "CrEOF/doctrine2-spatial": "^0.1"
17 |
18 | You will also have to change the version requirement of doctrine to at least 2.1:
19 |
20 | "doctrine/orm": ">=2.1",
21 |
22 | ## Configuration
23 | Read [configuration]() to configure the extension for Symfony
24 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geography/LineStringType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class LineStringType extends GeographyType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geography/PointType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class PointType extends GeographyType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geography/PolygonType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class PolygonType extends GeographyType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/GeographyType.php:
--------------------------------------------------------------------------------
1 |
30 | * @license http://dlambert.mit-license.org MIT
31 | */
32 | class GeographyType extends AbstractSpatialType
33 | {
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geometry/LineStringType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class LineStringType extends GeometryType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geometry/MultiPolygonType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MultiPolygonType extends GeometryType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geometry/PointType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class PointType extends GeometryType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/Geometry/PolygonType.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class PolygonType extends GeometryType
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/DBAL/Types/GeometryType.php:
--------------------------------------------------------------------------------
1 |
30 | * @license http://dlambert.mit-license.org MIT
31 | */
32 | class GeometryType extends AbstractSpatialType
33 | {
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/Exception/InvalidValueException.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class InvalidValueException extends Exception
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/Exception/UnsupportedPlatformException.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class UnsupportedPlatformException extends Exception
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Area.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Area extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'Area';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Buffer.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Buffer extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'Buffer';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Centroid.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class Centroid extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'Centroid';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Contains.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Contains extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'Contains';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Crosses.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class Crosses extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'Crosses';
40 |
41 | protected $minGeomExpr = 2;
42 |
43 | protected $maxGeomExpr = 2;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Dimension.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class Dimension extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'Dimension';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Disjoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Disjoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'Disjoint';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Distance.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class Distance extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'Distance';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/DistanceFromMultyLine.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class EndPoint extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'EndPoint';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Envelope.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Envelope extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'Envelope';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Equals.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class Equals extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'Equals';
40 |
41 | protected $minGeomExpr = 2;
42 |
43 | protected $maxGeomExpr = 2;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/ExteriorRing.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class ExteriorRing extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'ExteriorRing';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/GLength.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class GLength extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'GLength';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/GeodistPt.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class GeomFromText extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'GeomFromText';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/GeometryType.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class GeometryType extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'GeometryType';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/InteriorRingN.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class InteriorRingN extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'InteriorRingN';
40 |
41 | protected $minGeomExpr = 2;
42 |
43 | protected $maxGeomExpr = 2;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/IsClosed.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class IsClosed extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'IsClosed';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/IsEmpty.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class IsEmpty extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'IsEmpty';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/IsSimple.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class IsSimple extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'IsSimple';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/LineString.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://opensource.org/licenses/MIT MIT
33 | */
34 | class LineString extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'LineString';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/LineStringFromWKB.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MBRContains extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'MBRContains';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/MBRDisjoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MBRDisjoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'MBRDisjoint';
39 | }
40 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/MBREqual.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MBREqual extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'MBREqual';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Point.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mdhheydari.mit-license.org MIT
34 | */
35 | class SRID extends AbstractSpatialDQLFunction
36 | {
37 | protected $platforms = array('mysql');
38 |
39 | protected $functionName = 'SRID';
40 |
41 | protected $minGeomExpr = 1;
42 |
43 | protected $maxGeomExpr = 1;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STBuffer.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STContains extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Contains';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STCrosses.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STCrosses extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Crosses';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STDisjoint.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STDisjoint extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Disjoint';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STDistance.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STDistance extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Distance';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STDistanceSphere.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STDistanceSphere extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Distance_SPHERE';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STEquals.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STEquals extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Equals';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STGeomFromText:
--------------------------------------------------------------------------------
1 |
32 | */
33 | class STGeomFromText extends AbstractSpatialDQLFunction
34 | {
35 | protected $platforms = array('mysql');
36 |
37 | protected $functionName = 'ST_GEOMFROMTEXT';
38 |
39 | protected $minGeomExpr = 1;
40 |
41 | protected $maxGeomExpr = 1;
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STGeomFromText.php:
--------------------------------------------------------------------------------
1 |
32 | */
33 | class STGeomFromText extends AbstractSpatialDQLFunction
34 | {
35 | protected $platforms = array('mysql');
36 |
37 | protected $functionName = 'ST_GeomFromText';
38 |
39 | protected $minGeomExpr = 1;
40 |
41 | protected $maxGeomExpr = 2;
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STIntersects.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mit-license.org MIT
34 | */
35 | class STOverlaps extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Overlaps';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STTouches.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://mit-license.org MIT
34 | */
35 | class STTouches extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Touches';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/STWithin.php:
--------------------------------------------------------------------------------
1 |
33 | * @license http://dlambert.mit-license.org MIT
34 | */
35 | class STWithin extends AbstractSpatialDQLFunction {
36 |
37 | protected $platforms = array('mysql');
38 | protected $functionName = 'ST_Within';
39 | protected $minGeomExpr = 2;
40 | protected $maxGeomExpr = 2;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/StartPoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class StartPoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('mysql');
37 |
38 | protected $functionName = 'StartPoint';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/X.php:
--------------------------------------------------------------------------------
1 |
34 | * @license http://mdhheydari.mit-license.org MIT
35 | */
36 | class X extends AbstractSpatialDQLFunction
37 | {
38 | protected $platforms = array('mysql');
39 |
40 | protected $functionName = 'X';
41 |
42 | protected $minGeomExpr = 1;
43 |
44 | protected $maxGeomExpr = 1;
45 | }
46 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/MySql/Y.php:
--------------------------------------------------------------------------------
1 |
34 | * @license http://mdhheydari.mit-license.org MIT
35 | */
36 | class Y extends AbstractSpatialDQLFunction
37 | {
38 | protected $platforms = array('mysql');
39 |
40 | protected $functionName = 'Y';
41 |
42 | protected $minGeomExpr = 1;
43 |
44 | protected $maxGeomExpr = 1;
45 | }
46 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/Geometry.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Geometry extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'geometry';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STArea.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STArea extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Area';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STAzimuth.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http:// mit-license.org MIT
33 | */
34 | class STAzimuth extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Azimuth';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STBuffer.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STCentroid extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Centroid';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STClosestPoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STClosestPoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_ClosestPoint';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STCollect.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STCollect extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Collect';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STContains.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STContains extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Contains';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STContainsProperly.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STContainsProperly extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_ContainsProperly';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STCoveredBy.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STCoveredBy extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_CoveredBy';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STCovers.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STCovers extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Covers';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STCrosses.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STCrosses extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Crosses';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STDWithin.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STDisjoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Disjoint';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STDistance.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STDistance extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Distance';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 3;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STDistanceSphere.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STDistanceSphere extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Distance_Sphere';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STEndPoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STEndPoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_EndPoint';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STEnvelope.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STEnvelope extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Envelope';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STExpand.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STExtent extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Extent';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STGeomFromEWKT.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STGeomFromEWKT extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_GeomFromEWKT';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STGeomFromText.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STGeomFromText extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_GeomFromText';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STIntersection.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STIntersection extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Intersection';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STIntersects.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STIntersects extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Intersects';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STLength.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STLength extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Length';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STLineInterpolatePoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STLineInterpolatePoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Line_Interpolate_Point';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STLineLocatePoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STLineLocatePoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Line_Locate_Point';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STMakeBox2D.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STMakeBox2D extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_MakeBox2D';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STMakePoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STPoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Point';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STScale.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STScale extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Scale';
39 |
40 | protected $minGeomExpr = 3;
41 |
42 | protected $maxGeomExpr = 3;
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STSetSRID.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STSetSRID extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_SetSRID';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STSimplify.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STStartPoint extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_StartPoint';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STSummary.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class STSummary extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Summary';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STTouches.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STTouches extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Touches';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STTransform.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://mit-license.org MIT
33 | */
34 | class STWithin extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Within';
39 |
40 | protected $minGeomExpr = 2;
41 |
42 | protected $maxGeomExpr = 2;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STX.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http:// mit-license.org MIT
33 | */
34 | class STX extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_X';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/PostgreSql/STY.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http:// mit-license.org MIT
33 | */
34 | class STY extends AbstractSpatialDQLFunction
35 | {
36 | protected $platforms = array('postgresql');
37 |
38 | protected $functionName = 'ST_Y';
39 |
40 | protected $minGeomExpr = 1;
41 |
42 | protected $maxGeomExpr = 1;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/ORM/Query/AST/Functions/ReturnsGeometryInterface.php:
--------------------------------------------------------------------------------
1 |
30 | * @license http://dlambert.mit-license.org MIT
31 | */
32 | interface ReturnsGeometryInterface
33 | {
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geography/LineString.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class LineString extends AbstractLineString implements GeographyInterface
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geography/Polygon.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Polygon extends AbstractPolygon implements GeographyInterface
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geometry/LineString.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class LineString extends AbstractLineString
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geometry/MultiLineString.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MultiLineString extends AbstractMultiLineString
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geometry/MultiPoint.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MultiPoint extends AbstractMultiPoint
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geometry/MultiPolygon.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class MultiPolygon extends AbstractMultiPolygon
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geometry/Point.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Point extends AbstractPoint
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/lib/CrEOF/Spatial/PHP/Types/Geometry/Polygon.php:
--------------------------------------------------------------------------------
1 |
32 | * @license http://dlambert.mit-license.org MIT
33 | */
34 | class Polygon extends AbstractPolygon
35 | {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 | ./tests/CrEOF/Spatial/Tests
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | ./lib/
30 |
31 | ./tests/CrEOF/Spatial/Tests
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/tests/CrEOF/Spatial/Tests/TestInit.php:
--------------------------------------------------------------------------------
1 | add('CrEOF\Spatial\Tests', __DIR__ . '/../../..');
9 | $loader->add('Doctrine\Tests', __DIR__ . '/../../../../vendor/doctrine/orm/tests');
10 | $loader->register();
11 |
--------------------------------------------------------------------------------
/tests/travis/composer.orm2.3.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "creof/doctrine2-spatial",
3 | "type": "library",
4 | "description": "Doctrine2 multi-platform support for spatial types and functions",
5 | "keywords": ["orm", "dbal", "database", "postgresql", "mysql", "opengis", "postgis", "gis", "spatial", "geometry", "geography"],
6 | "authors": [
7 | {
8 | "name": "Derek Lambert",
9 | "email": "dlambert@dereklambert.com"
10 | }
11 | ],
12 | "license": "MIT",
13 | "require": {
14 | "doctrine/orm": "<2.4",
15 | "creof/geo-parser": "~2.0",
16 | "creof/wkt-parser": "~2.0",
17 | "creof/wkb-parser": "~2.0"
18 | },
19 | "require-dev": {
20 | "phpunit/phpunit": "<5.0",
21 | "phpunit/phpcov": "*",
22 | "satooshi/php-coveralls": "~1.0"
23 | },
24 | "autoload": {
25 | "psr-0": {
26 | "CrEOF\\Spatial": "lib/"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tests/travis/composer.orm2.4.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "creof/doctrine2-spatial",
3 | "type": "library",
4 | "description": "Doctrine2 multi-platform support for spatial types and functions",
5 | "keywords": ["orm", "dbal", "database", "postgresql", "mysql", "opengis", "postgis", "gis", "spatial", "geometry", "geography"],
6 | "authors": [
7 | {
8 | "name": "Derek Lambert",
9 | "email": "dlambert@dereklambert.com"
10 | }
11 | ],
12 | "license": "MIT",
13 | "require": {
14 | "doctrine/orm": "<2.5",
15 | "creof/geo-parser": "~2.0",
16 | "creof/wkt-parser": "~2.0",
17 | "creof/wkb-parser": "~2.0"
18 | },
19 | "require-dev": {
20 | "phpunit/phpunit": "<5.0",
21 | "phpunit/phpcov": "*",
22 | "satooshi/php-coveralls": "~1.0"
23 | },
24 | "autoload": {
25 | "psr-0": {
26 | "CrEOF\\Spatial": "lib/"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tests/travis/composer.orm2.5.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "creof/doctrine2-spatial",
3 | "type": "library",
4 | "description": "Doctrine2 multi-platform support for spatial types and functions",
5 | "keywords": ["orm", "dbal", "database", "postgresql", "mysql", "opengis", "postgis", "gis", "spatial", "geometry", "geography"],
6 | "authors": [
7 | {
8 | "name": "Derek Lambert",
9 | "email": "dlambert@dereklambert.com"
10 | }
11 | ],
12 | "license": "MIT",
13 | "require": {
14 | "doctrine/orm": "<2.6",
15 | "creof/geo-parser": "~2.0",
16 | "creof/wkt-parser": "~2.0",
17 | "creof/wkb-parser": "~2.0"
18 | },
19 | "require-dev": {
20 | "phpunit/phpunit": "<5.0",
21 | "phpunit/phpcov": "*",
22 | "satooshi/php-coveralls": "~1.0"
23 | },
24 | "autoload": {
25 | "psr-0": {
26 | "CrEOF\\Spatial": "lib/"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tests/travis/travis.mysql.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 | ../CrEOF/Spatial/Tests
14 |
15 |
16 |
17 |
18 |
19 | srid
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | ../../lib/
37 |
38 | ../CrEOF/Spatial/Tests
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/tests/travis/travis.pgsql.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 | ../CrEOF/Spatial/Tests
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ../../lib/
31 |
32 | ../CrEOF/Spatial/Tests
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------