/branches/v5.8-aspergeraie/services/composer.json |
---|
New file |
0,0 → 1,5 |
{ |
"require": { |
"jsor/proj4php": "dev-master" |
} |
} |
/branches/v5.8-aspergeraie/services/modules/0.1/coord-transfo/Point.php |
---|
New file |
0,0 → 1,58 |
<?php |
// declare(encoding='UTF-8'); |
// Inclusion des dépendances à Proj4Php. |
require 'vendor/autoload.php'; |
/** |
* Transforme les coordonnées X et y d'un point en fonction d'un EPSG source (epsg-src) et d'un EPSG de |
* destination (epsg-dest). |
* |
* Exemples d'EPSG fonctionnels : |
* - Lambert 93 : EPSG:2154 |
* - WGS84 : EPSG:4326 |
* |
* @category eFlore |
* @package Services |
* @subpackage Coord-transfo |
* @version 0.1 |
* @author Mathias CHOUET <mathias@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @author Aurelien PERONNET <aurelien@tela-botanica.org> |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org> |
*/ |
class Point { |
private $parametres = array(); |
private $ressources = array(); |
private $coordonnees = array(); |
public function consulter($ressources, $parametres) { |
$this->ressources = $ressources; |
$this->parametres = $parametres; |
$retour = null; |
try { |
$this->transformerCoordonnees(); |
$retour = $this->coordonnees; |
} catch (Exception $erreur) { |
$retour = $erreur->getMessage(); |
} |
return $retour; |
} |
private function transformerCoordonnees() { |
$proj4 = new Proj4php(); |
$projSource = new Proj4phpProj('EPSG:'.$this->parametres['epsg-src'], $proj4); |
$projDestination = new Proj4phpProj('EPSG:'.$this->parametres['epsg-dest'], $proj4); |
$pointSrc = new proj4phpPoint($this->parametres['x'], $this->parametres['y']); |
$pointDest = $proj4->transform($projSource, $projDestination, $pointSrc); |
$this->coordonnees['x'] = round($pointDest->x, 5); |
$this->coordonnees['y'] = round($pointDest->y, 5); |
$this->coordonnees['EPSG'] = $this->parametres['epsg-dest']; |
} |
} |
/branches/v5.8-aspergeraie/services/configurations/config_nasa-srtm.ini |
---|
1,7 → 1,7 |
; Encodage : UTF-8 |
; Nom du projet |
nom_projet = "baseveg" |
nom_projet = "nasa-srtm" |
; URL de base des services de ce projet |
url_service = "{ref:url_base}service:eflore:0.1/altitude" |
/branches/v5.8-aspergeraie/services/configurations/config_coord-transfo.ini |
---|
New file |
0,0 → 1,10 |
; Encodage : UTF-8 |
; Nom du projet |
nom_projet = "coord-transfo" |
; URL de base des services de ce projet |
url_service = "{ref:url_base}service:eflore:0.1/coord-transfo" |
; services disponibles |
servicesDispo = "point" |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/branches/v5.8-aspergeraie/services/configurations/config.defaut.ini |
---|
76,7 → 76,7 |
; +------------------------------------------------------------------------------------------------------+ |
; Infos sur les projets |
; Liste des projets disponibles |
projetsDispo = "sophy,apd,sptba,nvps,bdnt,bdtfx,bdtxa,chorodep,coste,eflore,fournier,insee-d,iso-3166-1,iso-639-1,nvjfl,cel,lion1906,wikipedia,osm,prometheus,bibliobota,photoflora,baseflor,baseveg,sptb,isfan,nva,moissonnage,nasa-srtm,liste-rouge" |
projetsDispo = "sophy,apd,sptba,nvps,bdnt,bdtfx,bdtxa,chorodep,coste,eflore,fournier,insee-d,iso-3166-1,iso-639-1,nvjfl,cel,lion1906,wikipedia,osm,prometheus,bibliobota,photoflora,baseflor,baseveg,sptb,isfan,nva,moissonnage,nasa-srtm,coord-transfo,liste-rouge" |
; +------------------------------------------------------------------------------------------------------+ |
; Infos sur le cache |
/branches/v5.8-aspergeraie/services/composer.lock |
---|
New file |
0,0 → 1,81 |
{ |
"_readme": [ |
"This file locks the dependencies of your project to a known state", |
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
"This file is @generated automatically" |
], |
"hash": "6169c068e0d2d9a1af5618bcd904f161", |
"packages": [ |
{ |
"name": "jsor/proj4php", |
"version": "dev-master", |
"source": { |
"type": "git", |
"url": "https://github.com/jsor/proj4php.git", |
"reference": "4a991ef681d3f5266ddf07697218ec4f2f976dcf" |
}, |
"dist": { |
"type": "zip", |
"url": "https://api.github.com/repos/jsor/proj4php/zipball/4a991ef681d3f5266ddf07697218ec4f2f976dcf", |
"reference": "4a991ef681d3f5266ddf07697218ec4f2f976dcf", |
"shasum": "" |
}, |
"require": { |
"php": ">=5.1.0" |
}, |
"type": "library", |
"autoload": { |
"classmap": [ |
"src/" |
] |
}, |
"notification-url": "https://packagist.org/downloads/", |
"license": [ |
"LGPL-3.0" |
], |
"authors": [ |
{ |
"name": "Jan Sorgalla", |
"email": "jsorgalla@googlemail.com", |
"homepage": "http://sorgalla.com", |
"role": "maintainer" |
}, |
{ |
"name": "Rodrigue VILLETARD", |
"homepage": "http://sourceforge.net/users/gorghoa", |
"role": "developer" |
}, |
{ |
"name": "Moquet", |
"homepage": "http://sourceforge.net/users/julien2512", |
"role": "developer" |
} |
], |
"description": "LGPL public translation of proj4js for PHP", |
"homepage": "http://sourceforge.net/projects/proj4php/", |
"keywords": [ |
"geo", |
"proj4", |
"projection" |
], |
"time": "2014-06-01 18:04:04" |
} |
], |
"packages-dev": [ |
], |
"aliases": [ |
], |
"minimum-stability": "stable", |
"stability-flags": { |
"jsor/proj4php": 20 |
}, |
"prefer-stable": false, |
"platform": [ |
], |
"platform-dev": [ |
] |
} |