Download the PHP package nanson/yii2-postgis without Composer

On this page you can find all versions of the php package nanson/yii2-postgis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-postgis

Yii2 Postgis

Extension for working with Postgis. As intermediate format used Geo Json.

Installing

The preferred way to install this extension is through Composer.

GeometryBehavior

Converts coordinates array to SQL expression for saving in postgis binary format before insert/update and from postgis binary to array after find.

Option Type Default Description
attribute string attribute that will be automatically handled
type string geometry type: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon
skipAfterFindPostgis boolean false skip convertion after find, if data in postgis binary (it requires a separate query, look PostgisQueryTrait)

StBufferBehavior

Generate SQL expression before insert/update based on geometry and radius

Option Type Default Description
attribute string attribute for saving buffer
attributeGeometry string attribute with geometry
attributeRadius string attribute with radius
geography boolean false build buffer as geography
radiusUnit string deg for geomtery or m for geography units of buffer radius: deg, m, km
options array [] additional options for St_Buffer function

PostgisQueryTrait

Extends ActiveQuery for working with Postgis data.

Option Type Default Description
autoGeoJson boolean true select all geo columns as GeoJson automatically
geoFields array all table columns with data type geometry or geography table columns, that must be selected as Geo Json
exceptGeoFields boolean false exclude all geo columns from select statement
exceptFields array [] columns, which must be excluded from select statement
Method Description
withGeoFields($fields=null) Add columns, that must be selected as Geo Json. Accepts null, string, array. If fields is null - all geoFileds will be added.
excludeFields($fields=null) Exclude columns from select statement. Accepts null, string, array. If fields is null - all exceptFields will be excluded from select statement.

GeoJsonHelper

Helper for working with Geo Json

Method Returns Description
toArray($geoJson) array returns coordinates array by Geo Json
toGeoJson($type, $coordinates, $srid=4326) string (geo json) returns Geo Json by geometry type, coordinates array and SRID
toGeometry($type, $coordinates, $srid=4326) string (sql expression) the same, that toGeoJson, but wraps result by "ST_GeomFromGeoJSON('$geoJson')"

All versions of yii2-postgis with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nanson/yii2-postgis contains the following files

Loading the files please wait ....