Skip to content

Commit 0e64038

Browse files
committed
The 'interpolate_polygon' function never did such a thing
1 parent fec19b1 commit 0e64038

File tree

3 files changed

+1
-53
lines changed

3 files changed

+1
-53
lines changed

geospatial.c

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -972,50 +972,6 @@ PHP_FUNCTION(interpolate_linestring)
972972
}
973973
/* }}} */
974974

975-
/* {{{ proto array interpolate_polygon(GeoJSONPolygon polygon, float epsilon)
976-
Interpolates polygons with intermediate points to show line segments as GC lines */
977-
PHP_FUNCTION(interpolate_polygon)
978-
{
979-
zval *polygon;
980-
double epsilon;
981-
geo_array *points;
982-
int i;
983-
zval *pair;
984-
985-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zd", &polygon, &epsilon) == FAILURE) {
986-
return;
987-
}
988-
989-
if (Z_TYPE_P(polygon) != IS_ARRAY) {
990-
return;
991-
}
992-
993-
if (!geojson_linestring_to_array(polygon, &points)) {
994-
RETURN_FALSE;
995-
}
996-
997-
array_init(return_value);
998-
999-
rdp_simplify(points, epsilon, 0, points->count - 1);
1000-
1001-
for (i = 0; i < points->count; i++) {
1002-
if (points->status[i]) {
1003-
GEOSPAT_MAKE_STD_ZVAL(pair);
1004-
array_init(pair);
1005-
add_next_index_double(pair, points->x[i]);
1006-
add_next_index_double(pair, points->y[i]);
1007-
add_next_index_zval(return_value, pair);
1008-
#if PHP_VERSION_ID >= 70000
1009-
efree(pair);
1010-
#endif
1011-
}
1012-
}
1013-
1014-
geo_array_dtor(points);
1015-
}
1016-
/* }}} */
1017-
1018-
1019975
/* {{{ string geohash_encode(GeoJSONPoint $point [, int $precision = 12])
1020976
*/
1021977
PHP_FUNCTION(geohash_encode)

php_geospatial.stub.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ function initial_bearing(array $from, array $to): float {}
4343
function rdp_simplify(array $points, float $epsilon): array {}
4444

4545
function interpolate_linestring(array $line, float $epsilon): array {}
46-
function interpolate_polygon(array $polygon, float $epsilon): array {}
4746

4847
function geohash_encode(array $point, int $precision = 12): string {}
4948
function geohash_decode(string $geohash): array {}

php_geospatial_arginfo.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: e128dccdbd9aa407d95c5b62e8000cb12d0bffa3 */
2+
* Stub hash: 52022e47a6841ea20db60c2c92eba319cfc6c563 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dms_to_decimal, 0, 3, IS_DOUBLE, 0)
55
ZEND_ARG_TYPE_INFO(0, degrees, IS_DOUBLE, 0)
@@ -73,11 +73,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_interpolate_linestring, 0, 2, IS
7373
ZEND_ARG_TYPE_INFO(0, epsilon, IS_DOUBLE, 0)
7474
ZEND_END_ARG_INFO()
7575

76-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_interpolate_polygon, 0, 2, IS_ARRAY, 0)
77-
ZEND_ARG_TYPE_INFO(0, polygon, IS_ARRAY, 0)
78-
ZEND_ARG_TYPE_INFO(0, epsilon, IS_DOUBLE, 0)
79-
ZEND_END_ARG_INFO()
80-
8176
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_geohash_encode, 0, 1, IS_STRING, 0)
8277
ZEND_ARG_TYPE_INFO(0, point, IS_ARRAY, 0)
8378
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, precision, IS_LONG, 0, "12")
@@ -100,7 +95,6 @@ ZEND_FUNCTION(fraction_along_gc_line);
10095
ZEND_FUNCTION(initial_bearing);
10196
ZEND_FUNCTION(rdp_simplify);
10297
ZEND_FUNCTION(interpolate_linestring);
103-
ZEND_FUNCTION(interpolate_polygon);
10498
ZEND_FUNCTION(geohash_encode);
10599
ZEND_FUNCTION(geohash_decode);
106100

@@ -118,7 +112,6 @@ static const zend_function_entry ext_functions[] = {
118112
ZEND_FE(initial_bearing, arginfo_initial_bearing)
119113
ZEND_FE(rdp_simplify, arginfo_rdp_simplify)
120114
ZEND_FE(interpolate_linestring, arginfo_interpolate_linestring)
121-
ZEND_FE(interpolate_polygon, arginfo_interpolate_polygon)
122115
ZEND_FE(geohash_encode, arginfo_geohash_encode)
123116
ZEND_FE(geohash_decode, arginfo_geohash_decode)
124117
ZEND_FE_END

0 commit comments

Comments
 (0)