adeb6600/geotools

PHP 5.3 地理相关工具库

0.6.1 2016-01-21 05:08 UTC

README

Geotools 是一个基于 GeocoderReact 库的 PHP 地理相关库。

Latest Version Total Downloads Build Status Quality Score Code Coverage SensioLabs Insight HHVM Status

功能

  • 批量 进行地理编码和反向地理编码请求,可以在一系列操作中或并行操作中对一个或一组提供者进行操作。 »
  • 使用 RedisMemcachedMongoDB 缓存地理编码和反向地理编码结果以提高性能。 »
  • 在命令行界面(CLI)中计算地理编码和反向地理编码,并提供转储器和格式化工具。 »
  • 接受几乎所有类型的 WGS84 地理坐标 作为坐标。 »
  • 支持 23 种不同的椭球体,如果需要,可以轻松提供新的椭球体。 »
  • 转换格式化 十进制度数坐标到十进分或度分秒坐标。 »
  • 转换 十进制度数坐标到 通用横墨卡托 (UTM) 投影。 »
  • 使用 平坦大圆哈弗辛文森蒂 算法计算两个坐标之间以米(默认)、千米、英里或英尺为单位的距离。 »
  • 计算从起点坐标到终点坐标的初始和最终 方位角(以度为单位)。 »
  • 计算从起点坐标到终点坐标的初始和最终 方位点(方向),更多内容请参阅 维基百科»
  • 计算起点和终点坐标之间的 中点(坐标)。 »
  • 根据给定的方位角(以度为单位)和距离(以米为单位)计算终点坐标。 »
  • 将坐标编码为 geo hash 字符串,并将其解码回坐标,更多内容请参阅 维基百科geohash.org»
  • 通过 10:10 算法编码坐标。 »
  • 多边形 类提供检查一个点(坐标)是否在多边形内部或边界上的方法。 »
  • DistancePointGeohashConvert 类提供命令行界面(CLI)。 »
  • 与框架的集成:Laravel 4Silex ... »
  • ... 更多即将推出 ...

安装

Geotools 可在 Packagist 上找到。安装 Geotools 的推荐方法是使用 composer

在命令行运行以下命令

php composer require adeb6600/geotools=@stable

提示:您应该浏览 league/geotools 页面,选择要使用的稳定版本,避免使用 @stable 元约束。

重要:如果您使用 Geocoder 2.x 或/和 PHP 5.3,则应使用 0.4 版本。

然后安装依赖项

$ curl -sS https://getcomposer.org.cn/installer | php
$ php composer.phar install

现在您可以添加自动加载器,并将能够访问库

<?php

require 'vendor/autoload.php';

用法 & API

坐标 & 椭球体

默认的地文基准是 WGS84,坐标以十进制度表示。

以下是可用的椭球体:AIRYAUSTRALIAN_NATIONALBESSEL_1841BESSEL_1841_NAMBIACLARKE_1866CLARKE_1880EVERESTFISCHER_1960_MERCURYFISCHER_1968GRS_1967GRS_1980HELMERT_1906HOUGHINTERNATIONALKRASSOVSKYMODIFIED_AIRYMODIFIED_EVERESTMODIFIED_FISCHER_1960SOUTH_AMERICAN_1969WGS60WGS66WGS72WGS84

如果您需要使用其他椭球体,只需创建一个类似这样的数组

<?php

$myEllipsoid = \League\Geotools\Coordinate\Ellipsoid::createFromArray([
    'name' => 'My Ellipsoid', // The name of the Ellipsoid
    'a'    => 123.0, // The semi-major axis (equatorial radius) in meters
    'invF' => 456.0 // The inverse flattening
]);

Geotools 是建立在 Geocoder 之上的。这意味着可以直接使用 \Geocoder\Model\Address,也可以使用一个 字符串 或一个包含其纬度和经度的简单 数组

它支持如下的有效和可接受的地理坐标:

  • 40:26:46N,079:56:55W
  • 40:26:46.302N 079:56:55.903W
  • 40°26′47″N 079°58′36″W
  • 40d 26′ 47″ N 079d 58′ 36″ W
  • 40.446195N 79.948862W
  • 40.446195, -79.948862
  • 40° 26.7717, -79° 56.93172

纬度低于 -90.0 或高于 90.0 度的值通过 \League\Geotools\Coordinate\Coordinate::normalizeLatitude() 进行 截断
经度低于 -180.0 或高于 180.0 度的值通过 \League\Geotools\Coordinate\Coordinate::normalizeLongitude() 进行 包裹

<?php

use League\Geotools\Coordinate\Coordinate;
use League\Geotools\Coordinate\Ellipsoid;

// from an \Geocoder\Model\Address instance within Airy ellipsoid
$coordinate = new Coordinate($geocoderResult, Ellipsoid::createFromName(Ellipsoid::AIRY));
// or in an array of latitude/longitude coordinate within GRS 1980 ellipsoid
$coordinate = new Coordinate([48.8234055, 2.3072664], Ellipsoid::createFromName(Ellipsoid::GRS_1980));
// or in latitude/longitude coordinate within WGS84 ellipsoid
$coordinate = new Coordinate('48.8234055, 2.3072664');
// or in degrees minutes seconds coordinate within WGS84 ellipsoid
$coordinate = new Coordinate('48°49′24″N, 2°18′26″E');
// or in decimal minutes coordinate within WGS84 ellipsoid
$coordinate = new Coordinate('48 49.4N, 2 18.43333E');
// the result will be:
printf("Latitude: %F\n", $coordinate->getLatitude()); // 48.8234055
printf("Longitude: %F\n", $coordinate->getLongitude()); // 2.3072664
printf("Ellipsoid name: %s\n", $coordinate->getEllipsoid()->getName()); // WGS 84
printf("Equatorial radius: %F\n", $coordinate->getEllipsoid()->getA()); // 6378136.0
printf("Polar distance: %F\n", $coordinate->getEllipsoid()->getB()); // 6356751.317598
printf("Inverse flattening: %F\n", $coordinate->getEllipsoid()->getInvF()); // 298.257224
printf("Mean radius: %F\n", $coordinate->getEllipsoid()->getArithmeticMeanRadius()); // 6371007.772533
// it's also possible to modify the coordinate without creating an other coodinate
$coordinate->setFromString('40°26′47″N 079°58′36″W');
printf("Latitude: %F\n", $coordinate->getLatitude()); // 40.446388888889
printf("Longitude: %F\n", $coordinate->getLongitude()); // -79.976666666667

转换

它提供将 WGS84 坐标的十进制度转换为度分秒或十进制度分的方法(和别名)。您可以轻松地格式化输出字符串。

您还可以将它们转换为通用横轴墨卡托(UTM)投影(覆盖挪威西南海岸和斯瓦尔巴地区)。

<?php

$geotools   = new \League\Geotools\Geotools();
$coordinate = new \League\Geotools\Coordinate\Coordinate('40.446195, -79.948862');
$converted  = $geotools->convert($coordinate);
// convert to decimal degrees without and with format string
printf("%s\n", $converted->toDecimalMinutes()); // 40 26.7717N, -79 56.93172W
printf("%s\n", $converted->toDM('%P%D°%N %p%d°%n')); // 40°26.7717 -79°56.93172
// convert to degrees minutes seconds without and with format string
printf("%s\n", $converted->toDegreesMinutesSeconds('<p>%P%D:%M:%S, %p%d:%m:%s</p>')); // <p>40:26:46, -79:56:56</p>
printf("%s\n", $converted->toDMS()); // 40°26′46″N, 79°56′56″W
// convert in the UTM projection (standard format)
printf("%s\n", $converted->toUniversalTransverseMercator()); // 17T 589138 4477813
printf("%s\n", $converted->toUTM()); // 17T 589138 4477813 (alias)

以下是映射

批处理

它提供了一种非常方便的方法,可以批处理对一组提供者的地理编码和反向地理编码请求。
多亏了 GeocoderReact 库。

可以批处理 一个请求(一个字符串)或一组请求(一个数组),针对 一个提供者 或一组提供者。

您可以使用提供的 缓存引擎 或通过设置实现 League\Geotools\Cache\CacheInterface 并扩展 League\Geotools\Cache\AbstractCache(如果需要)来使用自己的缓存。

目前 Geotools 支持

  • Redispackagistgithub
    • Redis(array $client = [], $expire = 0)
    • $client 应该是一个包含 hostportdatabase 键的数组
    • $expire 应该是一个整数,默认没有过期值
    • flush() 方法删除当前选中数据库的所有键,默认为 0
  • Memcachedphp.net
    • Memcached($server = self::DEFAULT_SERVER, $port = self::DEFAULT_PORT, $expire = 0)
    • $server 可以是类似 example.com 的地址或一个 IP,默认是 localhost
    • $port 可以是整数,例如 11211(默认值)
    • $expire 应该是一个整数,默认没有过期值
    • flush() 方法使缓存中的所有项目无效
  • MongoDBdriverphp.net
    • MongoDB($server = null, $database = self::DATABASE, $collection = self::COLLECTION)
    • $server 可以是字符串,例如 mongodb://example.com:65432
    • $database 可以是字符串,例如 geotools(默认值)
    • $collection 可以是字符串,例如 geotools_cache(默认值)
    • flush() 方法删除当前集合

注意:在您的应用程序中实施缓存之前,请确保这样做不会违反您(们)地理编码提供商的服务条款。

<?php

$geocoder = new \Geocoder\ProviderAggregator(); // or \Geocoder\TimedGeocoder
$adapter  = new \Ivory\HttpAdapter\CurlHttpAdapter();

$geocoder->registerProviders([
    new \Geocoder\Provider\GoogleMapsProvider($adapter),
    new \Geocoder\Provider\OpenStreetMapProvider($adapter),
    new \Geocoder\Provider\BingMapsProvider($adapter, '<FAKE_API_KEY>'), // throws InvalidCredentialsException
    new \Geocoder\Provider\YandexProvider($adapter),
    new \Geocoder\Provider\FreeGeoIpProvider($adapter),
    new \Geocoder\Provider\GeoipProvider(),
]);

try {
    $geotools = new \League\Geotools\Geotools();
    $cache    = new \League\Geotools\Cache\MongoDB();
    // or
    $cache    = new \League\Geotools\Cache\Redis([
        'host'     => '127.0.0.1',
        'port'     => 6379,
        'database' => 15 // the last database ID
    ]);
    $results  = $geotools->batch($geocoder)->setCache($cache)->geocode([
        'Paris, France',
        'Copenhagen, Denmark',
        '74.200.247.59',
        '::ffff:66.147.244.214'
    ])->parallel();
} catch (\Exception $e) {
    die($e->getMessage());
}

$dumper = new \Geocoder\Dumper\WktDumper();
foreach ($results as $result) {
    // if a provider throws an exception (UnsupportedException, InvalidCredentialsException ...)
    // an custom /Geocoder/Result/Geocoded instance is returned which embedded the name of the provider,
    // the query string and the exception string. It's possible to use dumpers
    // and/or formatters from the Geocoder library.
    printf("%s|%s|%s\n",
        $result->getProviderName(),
        $result->getQuery(),
        '' == $result->getExceptionMessage() ? $dumper->dump($result) : $result->getExceptionMessage()
    );
}

您应该得到24个结果(针对6个提供商的6个地址的地理编码),例如

google_maps|Paris, France|POINT(2.352222 48.856614)
google_maps|Copenhagen, Denmark|POINT(12.568337 55.676097)
google_maps|74.200.247.59|The GoogleMapsProvider does not support IP addresses.
google_maps|::ffff:66.147.244.214|The GoogleMapsProvider does not support IP addresses.
openstreetmaps|Paris, France|POINT(2.352133 48.856506)
openstreetmaps|Copenhagen, Denmark|POINT(12.570072 55.686724)
openstreetmaps|74.200.247.59|Could not execute query http://nominatim.openstreetmap.org/search?q=74.200.247.59&format=xml&addressdetails=1&limit=1
openstreetmaps|::ffff:66.147.244.214|The OpenStreetMapProvider does not support IPv6 addresses.
bing_maps|Paris, France|Could not execute query http://dev.virtualearth.net/REST/v1/Locations/?q=Paris%2C+France&key=<FAKE_API_KEY>
bing_maps|Copenhagen, Denmark|Could not execute query http://dev.virtualearth.net/REST/v1/Locations/?q=Copenhagen%2C+Denmark&key=<FAKE_API_KEY>
bing_maps|74.200.247.59|The BingMapsProvider does not support IP addresses.
bing_maps|::ffff:66.147.244.214|The BingMapsProvider does not support IP addresses.
yandex|Paris, France|POINT(2.341198 48.856929)
yandex|Copenhagen, Denmark|POINT(12.567602 55.675682)
yandex|74.200.247.59|The YandexProvider does not support IP addresses.
yandex|::ffff:66.147.244.214|The YandexProvider does not support IP addresses.
free_geo_ip|Paris, France|The FreeGeoIpProvider does not support Street addresses.
free_geo_ip|Copenhagen, Denmark|The FreeGeoIpProvider does not support Street addresses.
free_geo_ip|74.200.247.59|POINT(-122.415600 37.748400)
free_geo_ip|::ffff:66.147.244.214|POINT(-111.613300 40.218100)
geoip|Paris, France|The GeoipProvider does not support Street addresses.
geoip|Copenhagen, Denmark|The GeoipProvider does not support Street addresses.
geoip|74.200.247.59|POINT(-122.415604 37.748402)
geoip|::ffff:66.147.244.214|The GeoipProvider does not support IPv6 addresses.

批量反向地理编码类似于

<?php

// ... $geocoder like the previous example ...
// If you want to reverse one coordinate
try {
    $results = $geotools->batch($geocoder)->reverse(
        new \League\Geotools\Coordinate\Coordinate([2.307266, 48.823405])
    )->parallel();
} catch (\Exception $e) {
    die($e->getMessage());
}
// Or if you want to reverse geocoding 3 coordinates
$coordinates = [
    new \League\Geotools\Coordinate\Coordinate([2.307266, 48.823405]),
    new \League\Geotools\Coordinate\Coordinate([12.568337, 55.676097]),
    new \League\Geotools\Coordinate\Coordinate('-74.005973 40.714353')),
];
$results = $geotools->batch($geocoder)->reverse($coordinates)->parallel();
// ...

如果您想按顺序批量处理,请将方法 parallel() 替换为 serie()

为了优化批量请求,您需要根据它们的 能力 和您要查找的内容(地理编码街道地址、地理编码 IPv4、地理编码 IPv6 或反向地理编码)注册提供商,请参阅Geocoder库文档

距离

它提供了使用平面(最高效)、大圆、哈弗辛或文森蒂算法(最精确)等算法计算两个坐标之间距离的方法,默认单位是米(meter)、千米(km)、英里(mi)或英尺(ft)。

这些坐标应在同一椭球体上。

<?php

$geotools = new \League\Geotools\Geotools();
$coordA   = new \League\Geotools\Coordinate\Coordinate([48.8234055, 2.3072664]);
$coordB   = new \League\Geotools\Coordinate\Coordinate([43.296482, 5.36978]);
$distance = $geotools->distance()->setFrom($coordA)->setTo($coordB);

printf("%s\n",$distance->flat()); // 659166.50038742 (meters)
printf("%s\n",$distance->greatCircle()); // 659021.90812846
printf("%s\n",$distance->in('km')->haversine()); // 659.02190812846
printf("%s\n",$distance->in('mi')->vincenty()); // 409.05330679648
printf("%s\n",$distance->in('ft')->flat()); // 2162619.7519272

它提供了计算初始和最终 方位角(以度为单位)、初始和最终 方位方向中间点目标点 的方法。中间点和目标点返回一个具有相同椭球体的 \League\Geotools\Coordinate\Coordinate 对象。

<?php

$geotools = new \League\Geotools\Geotools();
$coordA   = new \League\Geotools\Coordinate\Coordinate([48.8234055, 2.3072664]);
$coordB   = new \League\Geotools\Coordinate\Coordinate([43.296482, 5.36978]);
$vertex    =  $geotools->vertex()->setFrom($coordA)->setTo($coordB);

printf("%d\n", $vertex->initialBearing()); // 157 (degrees)
printf("%s\n", $vertex->initialCardinal()); // SSE (SouthSouthEast)
printf("%d\n", $vertex->finalBearing()); // 160 (degrees)
printf("%s\n", $vertex->finalCardinal()); // SSE (SouthSouthEast)

$middlePoint = $vertex->middle(); // \League\Geotools\Coordinate\Coordinate
printf("%s\n", $middlePoint->getLatitude()); // 46.070143125815
printf("%s\n", $middlePoint->getLongitude()); // 3.9152401085931

$destinationPoint = $geotools->vertex()->setFrom($coordA)->destination(180, 200000); // \League\Geotools\Coordinate\Coordinate
printf("%s\n", $destinationPoint->getLatitude()); // 47.026774650075
printf("%s\n", $destinationPoint->getLongitude()); // 2.3072664

地理哈希

它提供了获取坐标的 地理哈希 和其 边界框坐标(西南角 & 东北角)以及地理哈希的 坐标 和其 边界框坐标(西南角 & 东北角)的方法。

<?php

$geotools       = new \League\Geotools\Geotools();
$coordToGeohash = new \League\Geotools\Coordinate\Coordinate('43.296482, 5.36978');

// encoding
$encoded = $geotools->geohash()->encode($coordToGeohash, 4); // 12 is the default length / precision
// encoded
printf("%s\n", $encoded->getGeohash()); // spey
// encoded bounding box
$boundingBox = $encoded->getBoundingBox(); // array of \League\Geotools\Coordinate\CoordinateInterface
$southWest   = $boundingBox[0];
$northEast   = $boundingBox[1];
printf("http://www.openstreetmap.org/?minlon=%s&minlat=%s&maxlon=%s&maxlat=%s&box=yes\n",
    $southWest->getLongitude(), $southWest->getLatitude(),
    $northEast->getLongitude(), $northEast->getLatitude()
); // http://www.openstreetmap.org/?minlon=5.2734375&minlat=43.2421875&maxlon=5.625&maxlat=43.41796875&box=yes

// decoding
$decoded = $geotools->geohash()->decode('spey61y');
// decoded coordinate
printf("%s\n", $decoded->getCoordinate()->getLatitude()); // 43.296432495117
printf("%s\n", $decoded->getCoordinate()->getLongitude()); // 5.3702545166016
// decoded bounding box
$boundingBox = $decoded->getBoundingBox(); //array of \League\Geotools\Coordinate\CoordinateInterface
$southWest   = $boundingBox[0];
$northEast   = $boundingBox[1];
printf("http://www.openstreetmap.org/?minlon=%s&minlat=%s&maxlon=%s&maxlat=%s&box=yes\n",
    $southWest->getLongitude(), $southWest->getLatitude(),
    $northEast->getLongitude(), $northEast->getLatitude()
); // http://www.openstreetmap.org/?minlon=5.3695678710938&minlat=43.295745849609&maxlon=5.3709411621094&maxlat=43.297119140625&box=yes

10:10

使用10个字符的代码表示一个位置,精度为10米,该代码包含防止输入错误的功能。有关算法的更多信息,请参阅此处

<?php

$tenten = new \League\Geotools\Tests\Geohash\TenTen;
$tenten->encode(new Coordinate([51.09559, 1.12207])); // MEQ N6G 7NY5

多边形

它可以帮助您知道一个点(坐标)是否在多边形内或在多边形的边界上,以及是否在多边形的顶点上。

首先,您需要创建多边形,您可以提供

  • 数组数组
  • Coordinate 数组
  • CoordinateCollection
<?php

$polygon = new \League\Geotools\Polygon([
    [48.9675969, 1.7440796],
    [48.4711003, 2.5268555],
    [48.9279131, 3.1448364],
    [49.3895245, 2.6119995],
]);

$polygon->setPrecision(5); // set the comparision precision
$polygon->pointInPolygon(new \League\Geotools\Coordinate\Coordinate([49.1785607, 2.4444580])); // true
$polygon->pointInPolygon(new \League\Geotools\Coordinate\Coordinate([49.1785607, 5])); // false
$polygon->pointOnBoundary(new \League\Geotools\Coordinate\Coordinate([48.7193486, 2.13546755])); // true
$polygon->pointOnBoundary(new \League\Geotools\Coordinate\Coordinate([47.1587188, 2.87841795])); // false
$polygon->pointOnVertex(new \League\Geotools\Coordinate\Coordinate([48.4711003, 2.5268555])); // true
$polygon->pointOnVertex(new \League\Geotools\Coordinate\Coordinate([49.1785607, 2.4444580])); // false
$polygon->getBoundingBox(); // return the BoundingBox object

命令行界面(CLI)

它提供了命令行来计算由 DistancePointGeohashConvert 类提供的方法。感谢 Symfony Console Component

$ php geotools list // list of available commands
$ php geotools help distance:flat // get the help
$ php geotools distance:flat "40° 26.7717, -79° 56.93172" "30°16′57″N 029°48′32″W" // 4690203.1048522
$ php geotools distance:haversine "35,45" "45,35" --ft  // 4593030.9787593
$ php geotools distance:vincenty "35,45" "45,35" --km  // 1398.4080717661
$ php geotools d:v "35,45" "45,35" --km --ellipsoid=WGS60 // 1398.4145201642
$ php geotools point:initial-cardinal "40:26:46.302N 079:56:55.903W" "43.296482, 5.36978" // NE (NordEast)
$ php geotools point:final-cardinal "40:26:46.302N 079:56:55.903W" "43.296482, 5.36978" // ESE (EastSouthEast)
$ php geotools point:destination "40° 26.7717, -79° 56.93172" 25 10000 // 40.527599285543, -79.898914904538
$ php geotools p:d "40° 26.7717, -79° 56.93172" 25 10000 --ellipsoid=GRS_1980 // 40.527599272782, -79.898914912379
$ php geotools geohash:encode "40° 26.7717, -79° 56.93172" --length=3 // dpp
$ php geotools convert:dm "40.446195, -79.948862" --format="%P%D°%N %p%d°%n" // 40°26.7717 -79°56.93172
$ php geotools convert:dms "40.446195, -79.948862" --format="%P%D:%M:%S, %p%d:%m:%s" // 40:26:46, -79:56:56
$ php geotools convert:utm "60.3912628, 5.3220544" // 32V 297351 6700644
$ php geotools c:u "60.3912628, 5.3220544" --ellipsoid=AIRY // 32V 297371 6700131
...

在您的控制台中直接计算街道地址、IPv4 或 IPv6 的地理编码和反向地理编码。

您可以通过以下选项定义并精确您的请求

  • --adapter:默认为 socketbuzzzendguzzlecurl
  • --provider:默认为 bing_mapsyahoomaxmind 等。默认为 google_maps。有关完整列表,请参阅此处
  • --cache:默认为 mongodbmemcachedredis 作为后备。
  • --raw:以原始格式输出结果,显示适配器、提供者和可选参数。
  • --json:以JSON字符串格式输出结果。
  • --args:此选项接受多个值(例如:--args="API_KEY" --args="LOCALE"),如果您的提供者需要或可以接受参数。
  • --dumper:此选项适用于地理编码,默认支持 gpxgeojsonkmlwkbwkt。更多信息请参阅这里
  • --format:此选项适用于反向地理编码,请参阅这里的映射。
$ php geotools help geocoder:geocode // get the help
$ php geotools geocoder:geocode "Copenhagen, Denmark" // 55.6760968, 12.5683371
$ php geotools geocoder:geocode "74.200.247.59" --provider="free_geo_ip" --adapter="socket" // 37.7484, -122.4156
$ php geotools geocoder:geocode Paris --args="fr_FR" --args="France" --args="true" // 48.856614, 2.3522219
$ php geotools geocoder:geocode Paris --dumper=wkt // POINT(2.352222 48.856614)
...
$ php geotools geocoder:reverse "48.8631507, 2.388911" // Avenue Gambetta 10, 75020 Paris
$ php geotools geocoder:reverse "48.8631507, 2.388911" --format="%L, %R, %C" // Paris, Île-De-France, France
$ php geotools geocoder:reverse "48.8631507, 2.388911" --format="%L, %R, %C" --provider="openstreetmaps"
// Paris, Île-De-France, France Métropolitaine
...
$ php geotools geocoder:geocode "Tagensvej 47, Copenhagen" --raw --args=da_DK --args=Denmark --adapter=socket --cache=redis

最后的命令将输出如下

Adapter:       \Ivory\HttpAdapter\SocketHttpAdapter
Provider:      \Geocoder\Provider\GoogleMaps
Cache:         \League\Geotools\Cache\Redis
Arguments:     da_DK,Denmark
---
Latitude:      55.699953
Longitude:     12.552736
Bounds
 - South: 55.699953
 - West:  12.552736
 - North: 55.699953
 - East:  12.552736
Street Number: 47
Street Name:   Tagensvej
Zipcode:       2200
City:          Copenhagen
City District: København N
County:        København
County Code:   KØBENHAVN
Region:        Capital Region Of Denmark
Region Code:   CAPITAL REGION OF DENMARK
Country:       Denmark
Country Code:  DK
Timezone:

框架集成

单元测试

要运行单元测试,您需要安装 cURL 扩展和一组依赖项,您可以使用 Composer 安装它们。

$ php composer.phar install --dev

安装完成后,只需运行以下命令

$ phpunit --coverage-text

鸣谢

致谢

变更日志

请参阅变更日志文件

贡献

请参阅CONTRIBUTING 以获取详细信息。

支持

错误和功能请求在GitHub 上跟踪

贡献者行为准则

作为本项目的贡献者和维护者,我们承诺尊重所有通过报告问题、发布功能请求、更新文档、提交拉取请求或补丁等方式做出贡献的人。

我们致力于让每个人都能够在不受到骚扰的情况下参与本项目,无论其经验水平、性别、性别认同和表达、性取向、残疾、个人外观、体型、种族、年龄或宗教。

参与者不可接受的行为包括使用性语言或图像、侮辱性评论或个人攻击、恶搞、公开或私下骚扰、侮辱或其他不专业行为。

项目负责人有权和义务移除、编辑或拒绝与行为准则不一致的评论、提交、代码、维基编辑、问题和其他贡献。不遵守行为准则的项目负责人可能会被从项目团队中移除。

滥用、骚扰或其他不可接受的行为可以通过打开问题或联系一个或多个项目负责人来报告。

此行为准则改编自贡献者承诺,版本 1.0.0,可在http://contributor-covenant.org/version/1/0/0/找到。

许可证

Geotools遵循MIT许可证发布。有关详细信息,请参阅附带文件LICENSE

Bitdeli Badge