2017 © Pedro Peláez
 

library doctrine2-spatial

Doctrine2 multi-platform support for spatial types and functions

image

mythril/doctrine2-spatial

Doctrine2 multi-platform support for spatial types and functions

  • Tuesday, September 24, 2013
  • by mythril
  • Repository
  • 1 Watchers
  • 1 Stars
  • 78 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 92 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

doctrine2-spatial

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., (*1)

This package is a refactor/continuation of my doctrine2-mysql-spatial package., (*2)

Types

The following SQL/OpenGIS types have been implemented as PHP objects and accompanying Doctrine types:, (*3)

Geometry

  • Point
  • LineString
  • Polygon
  • MultiPoint
  • MultiLineString
  • MultiPolygon

Geography

Similar to Geometry but SRID value is always used (SRID supported in PostGIS only), and accepts only valid "geographic" coordinates., (*4)

  • Point
  • LineString
  • Polygon

Planned

  • GeometryCollection
  • 3D/4D geometries ??
  • Rasters ??????

There is support for both WKB/WKT and EWKB/EWKT return values. Currently only WKT/EWKT is used in statements., (*5)

Functions

Currently the following SQL functions are supported in DQL (more coming):, (*6)

PostgreSQL

  • ST_Area
  • ST_AsBinary
  • ST_AsText
  • ST_Centroid
  • ST_ClosestPoint
  • ST_Contains
  • ST_ContainsProperly
  • ST_CoveredBy
  • ST_Covers
  • ST_Crosses
  • ST_Disjoint
  • ST_Distance
  • ST_Envelope
  • ST_GeomFromText
  • ST_Length
  • ST_LineCrossingDirection
  • ST_StartPoint
  • ST_Summary

MySQL

  • Area
  • AsBinary
  • AsText
  • Contains
  • Disjoint
  • Envelope
  • GeomFromText
  • GLength
  • MBRContains
  • MBRDisjoint
  • StartPoint

DQL AST Walker

A DQL AST walker is included which when used with the following DQL functions will return the appropriate Geometry type object from queries instead of strings:, (*7)

  • AsText
  • ST_AsText
  • AsBinary
  • ST_AsBinary

EWKT/EWKB function support planned., (*8)

Example:

    $query = $this->em->createQuery('SELECT AsText(StartPoint(l.lineString)) MyLineStringEntity l');

    $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'CrEOF\Spatial\ORM\Query\GeometryWalker');

    $result = $query->getResult();

$result[n][1] will now be of type Point instead of the string 'POINT(X Y)', (*9)

The Versions

24/09 2013

dev-master

9999999-dev

Doctrine2 multi-platform support for spatial types and functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Derek J. Lambert

orm database postgresql dbal mysql geometry geography gis opengis postgis spatial

28/10 2012

dev-mysql-srid

dev-mysql-srid

Doctrine2 multi-platform support for spatial types and functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Derek J. Lambert

orm database postgresql dbal mysql geometry geography gis opengis postgis spatial

24/10 2012

dev-geography-refactor

dev-geography-refactor

Doctrine2 multi-platform support for spatial types and functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Derek J. Lambert

orm database postgresql dbal mysql geometry geography gis opengis postgis spatial

24/10 2012

dev-parser-refactor

dev-parser-refactor

Doctrine2 multi-platform support for spatial types and functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Derek J. Lambert

orm database postgresql dbal mysql geometry geography gis opengis postgis spatial

18/10 2012

dev-platform-refactor

dev-platform-refactor

Doctrine2 multi-platform support for spatial types and functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Derek J. Lambert

orm database postgresql dbal mysql geometry geography gis opengis postgis spatial

15/10 2012

dev-sqlwalker-visibility

dev-sqlwalker-visibility

Doctrine2 multi-platform support for spatial types and functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Derek J. Lambert

orm database postgresql dbal mysql geometry geography gis opengis postgis spatial