Loading

GEO.INTERSECTION

geo

The GEO.INTERSECTION function computes the intersection of two GEOSHAPE instances. The intersection process will produce a GEOSHAPE whose cells are common to the two initial shapes. The common cells will be of various resolutions, depending on the resolutions of the cells from the initial shapes. If you need the resulting shape to contain cells up to a specific resolution, you can call GEO.OPTIMIZE either on the result or on the initial shapes.

GEO.INTERSECTION is available since version 1.0.0.

See also

Signatures

Examples

'POLYGON((-0.60095429420474 49.582768678665, -2.1829855442047 48.747807741165, -2.7542746067047 46.902104616165, -1.6336691379547 46.001225709915, 0.058225393295288 46.968022584915, 0.93713164329529 48.066655397415, -0.11755585670474 49.604741334915, -0.60095429420474 49.582768678665))' 0.05 false GEO.WKT 'poly1' STORE '{ "type": "Polygon", "coordinates": [ [ [ -5.592041015625, 48.99463598353405 ], [ -5.6744384765625, 48.16974908365419 ], [ -4.932861328124999, 47.52461999690651 ], [ -3.7243652343749996, 47.092565552235705 ], [ -1.7907714843749998, 47.69127688626756 ], [ -1.0107421875, 48.052381984350035 ], [ -1.6204833984374998, 48.68370757165364 ], [ -3.1915283203125, 49.33944093715546 ], [ -5.592041015625, 48.99463598353405 ] ] ] }' 0.02 false GEO.JSON 'poly2' STORE $poly1 $poly2 GEO.INTERSECTION 'intersection' STORE // Since 2.4.0, you can easily view GeoShapes on the map, in both vscode and Warp Studio editors. [ $poly1 $poly2 $intersection ] <% DROP true ->GEOJSON JSON-> %> LMAP 'geojsonList' STORE // the map web component in vscode or warp studio will parse // this special object and draw the geoshapes { 'data' $geojsonList }