Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Gis extension for AutoAdmin

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 assets
Octocat-spinner-32 messages
Octocat-spinner-32 models BugFix: EGeoLinestring::addPoint() is now working. February 11, 2013
Octocat-spinner-32 AutoAdminEGis.php
Octocat-spinner-32 LICENSE
Octocat-spinner-32 ReadMe.md
ReadMe.md

AutoAdminGis is a CMS for geographic and geometric data. Design your databases freely, install this extension and operate with GEO data with pleasure: type coordinates from keyboard or visually edit shapes right on map!

This is an extensions for AutoAdmin CMS framework (that, in it's turn, is a base Yii extension).

Links

Requirements

Yii 1.1 or above (requires jQuery 1.7.1 or above).

Yii AutoAdmin Extension.

AutoAdminGis based on GIS Spatial data model and requires supporting of spatial data in your DB. It was tested on MySQL and PostgreSQL (with PostGIS extension) databases. But it should work on SQL Server and Oracle platforms as well.

To operate with shapes on map you have to have an internet connection (to connect with Google Maps server).

Setup

  1. Install the Yii AutoAdmin Extension.
  2. Edit the config: add the extension in AutoAdmin module section (see below).
  3. Design your DB interfaces basing on AutoAdmin standarts.

Yii config setup

In AutoAdmin module section set add necessary parameters:

[php]
$main['modules'] = array(
    'autoadmin'=>array(
        //...
        'extensions' => array(
            'Gis' => array(
                'srid' => 4326, //classic GPS coordinates (WGS84 geodesic system)
            ),
        ),
    ),
);

Usage

You may try real working AutoAdmin CMS here. In this "showroom" you'll find several good examples of interfaces with source PHP and SQL code.

Geo point interface

[php]
public function actionRuevents()
{
    $this->module->tableName('geo_ruevents');
    $this->module->setPK('id');
    $this->module->fieldsConf(array(
            array('title', 'string', 'What happened', array('show')),
            array('when_happened', 'date', 'When happened', array('show')),
            array('place', 'GisPoint', 'Where happened', array('show', 'null'))
        ));
    $this->pageTitle = 'Russian historical events';
    $this->module->sortDefault(array('when_happened'=>-1));
    $this->module->process();
}

Illustration of geo point interface

Geo polygon interface

[php]
public function actionParanormals()
{
    $this->module->tableName('geo_paranormals');
    $this->module->setPK('id');
    $this->module->fieldsConf(array(
            array('title', 'string', 'Phenomena', array('show')),
            array('zone', 'GisPolygon', 'Zone', array('show')),
        ));
    $this->pageTitle = 'World paranormal zones';
    $this->module->sortDefault(array('title'));
    $this->module->process();
}

Illustration of geo polygon interface

Geo line interface

[php]
public function actionExpeditions()
{
    $this->module->tableName('geo_expeditions');
    $this->module->setPK('id');
    $this->module->fieldsConf(array(
            array('title', 'string', 'Voyage', array('show')),
            array('route', 'gislinestring', 'Route', array('show', 'options'=>array('showCoords'=>false)))
        ));
    $this->pageTitle = 'Famous historical expeditions';
    $this->module->sortDefault(array('title'));
    $this->module->process();
}

Illustration of geo polyline interface

More examples you can find in the AutoAdmin showroom.

Field types

You can easily develope custom field types. A Field class have to inherite AAField and redefine methods you want to make custom.

AutoAdminGis currently operates only with plain objects and doesn't support multi-shapes for a while. Now it includes the following spatial types:

GisPoint

Standart geometrical points. Usually corresponds to POINT SQL type.

You may input coordinates manually or indicate points on map.

GisLinestring

Standart geometrical polylines. Usually corresponds to LINESTRING SQL type.

You may input coordinates manually or indicate path on map.

GisPolygon

Standart geometrical polygones. Usually corresponds to POLYGON SQL type.

You may input coordinates manually or indicate polygon on map, using multi-vertex polygon and rectangle tools.

Supported languages

English, russian.

What's next?

  • Support for other spatial types.
Something went wrong with that request. Please try again.