function polygonArrayToGeoLoop(polygonArray, geoLoop, isGeoJson) {
    const numVerts = polygonArray.length;
    const geoCoordArray = C._calloc(numVerts, SZ_LATLNG);
    // Support [lng, lat] pairs if GeoJSON is specified
    const latIndex = isGeoJson ? 1 : 0;
    const lngIndex = isGeoJson ? 0 : 1;
    for (let i = 0; i < numVerts * 2; i += 2) {
        C.HEAPF64.set(
            [polygonArray[i / 2][latIndex], polygonArray[i / 2][lngIndex]].map(degsToRads),
            geoCoordArray / SZ_DBL + i
        );
    }
    C.HEAPU32.set([numVerts, geoCoordArray], geoLoop / SZ_INT);
    return geoLoop;
}
Populate a C-appropriate GeoLoop struct from a polygon array
@private
@param  {number[][]} polygonArray  Polygon, as an array of coordinate pairs
@param  {number}  geoLoop          C pointer to a GeoLoop struct
@param  {boolean} isGeoJson        Whether coordinates are in [lng, lat] order per GeoJSON spec
@return {number}                   C pointer to populated GeoLoop struct