From 44c79daf1a5b779ec206133ff88124ebfa7189ec Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Tue, 29 Dec 2020 12:39:46 +0100 Subject: [PATCH] GEOS stubs (#4902) --- dictionaries/CallMap.php | 88 ++++++++++++++++++++++++++++++++++++++++ stubs/ext-geos.php | 25 ++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 stubs/ext-geos.php diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 4ee389127..ed8af0052 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -3608,6 +3608,94 @@ return [ 'geoip_region_name_by_code' => ['string|false', 'country_code'=>'string', 'region_code'=>'string'], 'geoip_setup_custom_directory' => ['void', 'path'=>'string'], 'geoip_time_zone_by_country_and_region' => ['string|false', 'country_code'=>'string', 'region_code='=>'string'], +'GEOSGeometry::__toString' => ['string'], +'GEOSGeometry::project' => ['float', 'other'=>'GEOSGeometry', 'normalized'=>'bool'], +'GEOSGeometry::interpolate' => ['GEOSGeometry', 'dist'=>'float', 'normalized'=>'bool'], +'GEOSGeometry::buffer' => ['GEOSGeometry', 'dist'=>'float', 'styleArray'=>'array'], +'GEOSGeometry::offsetCurve' => ['GEOSGeometry', 'dist'=>'float', 'styleArray'=>'array'], +'GEOSGeometry::envelope' => ['GEOSGeometry'], +'GEOSGeometry::intersection' => ['GEOSGeometry', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::convexHull' => ['GEOSGeometry'], +'GEOSGeometry::difference' => ['GEOSGeometry', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::symDifference' => ['GEOSGeometry', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::boundary' => ['GEOSGeometry'], +'GEOSGeometry::union' => ['GEOSGeometry', 'otherGeom='=>'GEOSGeometry'], +'GEOSGeometry::pointOnSurface' => ['GEOSGeometry'], +'GEOSGeometry::centroid' => ['GEOSGeometry'], +'GEOSGeometry::relate' => ['string|bool', 'otherGeom'=>'GEOSGeometry', 'pattern'=>'string'], +'GEOSGeometry::relateBoundaryNodeRule' => ['string', 'otherGeom'=>'GEOSGeometry', 'rule'=>'int'], +'GEOSGeometry::simplify' => ['GEOSGeometry', 'tolerance'=>'float', 'preserveTopology'=>'bool'], +'GEOSGeometry::normalize' => ['GEOSGeometry'], +'GEOSGeometry::extractUniquePoints' => ['GEOSGeometry'], +'GEOSGeometry::disjoint' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::touches' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::intersects' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::crosses' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::within' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::contains' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::overlaps' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::covers' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::coveredBy' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::equals' => ['bool', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::equalsExact' => ['bool', 'geom'=>'GEOSGeometry', 'tolerance'=>'float'], +'GEOSGeometry::isEmpty' => ['bool'], +'GEOSGeometry::checkValidity' => ['array{valid: bool, reason?: string, location?: GEOSGeometry}'], +'GEOSGeometry::isSimple' => ['bool'], +'GEOSGeometry::isRing' => ['bool'], +'GEOSGeometry::hasZ' => ['bool'], +'GEOSGeometry::isClosed' => ['bool'], +'GEOSGeometry::typeName' => ['string'], +'GEOSGeometry::typeId' => ['int'], +'GEOSGeometry::getSRID' => ['int'], +'GEOSGeometry::setSRID' => ['void', 'srid'=>'int'], +'GEOSGeometry::numGeometries' => ['int'], +'GEOSGeometry::geometryN' => ['GEOSGeometry', 'num'=>'int'], +'GEOSGeometry::numInteriorRings' => ['int'], +'GEOSGeometry::numPoints' => ['int'], +'GEOSGeometry::getX' => ['float'], +'GEOSGeometry::getY' => ['float'], +'GEOSGeometry::interiorRingN' => ['GEOSGeometry', 'num'=>'int'], +'GEOSGeometry::exteriorRing' => ['GEOSGeometry'], +'GEOSGeometry::numCoordinates' => ['int'], +'GEOSGeometry::dimension' => ['int'], +'GEOSGeometry::coordinateDimension' => ['int'], +'GEOSGeometry::pointN' => ['GEOSGeometry', 'num'=>'int'], +'GEOSGeometry::startPoint' => ['GEOSGeometry'], +'GEOSGeometry::endPoint' => ['GEOSGeometry'], +'GEOSGeometry::area' => ['float'], +'GEOSGeometry::length' => ['float'], +'GEOSGeometry::distance' => ['float', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::hausdorffDistance' => ['float', 'geom'=>'GEOSGeometry'], +'GEOSGeometry::snapTo' => ['GEOSGeometry', 'geom'=>'GEOSGeometry', 'tolerance'=>'float'], +'GEOSGeometry::node' => ['GEOSGeometry'], +'GEOSGeometry::delaunayTriangulation' => ['GEOSGeometry', 'tolerance'=>'float', 'onlyEdges'=>'bool'], +'GEOSGeometry::voronoiDiagram' => ['GEOSGeometry', 'tolerance'=>'float', 'onlyEdges'=>'bool', 'extent'=>'GEOSGeometry|null'], +'GEOSLineMerge' => ['array', 'geom'=>'GEOSGeometry'], +'GEOSPolygonize' => ['array{rings: GEOSGeometry[], cut_edges?: GEOSGeometry[], dangles: GEOSGeometry[], invalid_rings: GEOSGeometry[]}', 'geom'=>'GEOSGeometry'], +'GEOSRelateMatch' => ['bool', 'matrix'=>'string', 'pattern'=>'string'], +'GEOSSharedPaths' => ['GEOSGeometry', 'geom1'=>'GEOSGeometry', 'geom2'=>'GEOSGeometry'], +'GEOSVersion' => ['string'], +'GEOSWKBReader::__construct' => ['void'], +'GEOSWKBReader::read' => ['GEOSGeometry', 'wkb'=>'string'], +'GEOSWKBReader::readHEX' => ['GEOSGeometry', 'wkb'=>'string'], +'GEOSWKBWriter::__construct' => ['void'], +'GEOSWKBWriter::getOutputDimension' => ['int'], +'GEOSWKBWriter::setOutputDimension' => ['void', 'dim'=>'int'], +'GEOSWKBWriter::getByteOrder' => ['int'], +'GEOSWKBWriter::setByteOrder' => ['void', 'byteOrder'=>'int'], +'GEOSWKBWriter::getIncludeSRID' => ['bool'], +'GEOSWKBWriter::setIncludeSRID' => ['void', 'inc'=>'bool'], +'GEOSWKBWriter::write' => ['string', 'geom'=>'GEOSGeometry'], +'GEOSWKBWriter::writeHEX' => ['string', 'geom'=>'GEOSGeometry'], +'GEOSWKTReader::__construct' => ['void'], +'GEOSWKTReader::read' => ['GEOSGeometry', 'wkt'=>'string'], +'GEOSWKTWriter::__construct' => ['void'], +'GEOSWKTWriter::write' => ['string', 'geom'=>'GEOSGeometry'], +'GEOSWKTWriter::setTrim' => ['void', 'trim'=>'bool'], +'GEOSWKTWriter::setRoundingPrecision' => ['void', 'prec'=>'int'], +'GEOSWKTWriter::setOutputDimension' => ['void', 'dim'=>'int'], +'GEOSWKTWriter::getOutputDimension' => ['int'], +'GEOSWKTWriter::setOld3D' => ['void', 'val'=>'bool'], 'get_browser' => ['array|object|false', 'user_agent='=>'string', 'return_array='=>'bool'], 'get_call_stack' => [''], 'get_called_class' => ['class-string'], diff --git a/stubs/ext-geos.php b/stubs/ext-geos.php new file mode 100644 index 000000000..387d1c784 --- /dev/null +++ b/stubs/ext-geos.php @@ -0,0 +1,25 @@ +