The ->GEOSHAPE function converts a list of LONG geocells or HHCode prefixes (STRING or BYTES) to a GEOSHAPE.

->GEOSHAPE is available since version 2.6.0.

See also



// Zone in GeoJSON '{"type":"Polygon","coordinates":[[[-4.574435,48.641404],[-4.565680,48.641404],[-4.565680,48.636101],[-4.574435,48.636101],[-4.574435,48.641404]]]}' // Precision (10% of the bounding box diagonal) 0.1 // Consider all cells covering the area false GEO.JSON 'geoshape' STORE // Convert shape to list of STRING HHCode prefixes $geoshape T GEOSHAPE-> // Remove the last character of these prefixes, effectively // decreasing the resolution of the cell by 2. <% 'hhprefix' STORE $hhprefix 0 $hhprefix SIZE 1 - SUBSTRING %> F LMAP // Rebuild the GEOSHAPE from the list of trimmed prefixes. ->GEOSHAPE // Convert to GeoJSON for visualization ->GEOJSON JSON-> // Also visualize the original GEOSHAPE $geoshape ->GEOJSON JSON->