UNPKG

make-geo-json

Version:

Converts polylines, wkts, wkbs, polygons, circles, rectangles, as well as standard geoJSON into geoJSON MultiPolygon Feature Objects. Converts wkb_list and FeatureCollection to arrays.

20 lines (17 loc) 497 B
'use strict'; var _index = require('./index'); require('babel-polyfill'); exports.handler = async (event, context, callback) => { console.log('Entry event', event); JSON.parse(JSON.stringify(event)); console.log('PARSED', event); try { // console.log({ event }); // const response = event; const response = await (0, _index.makeGeoJSON)(event.type, event.poly); console.log('RESPONSE', response); callback(null, response); } catch (err) { callback(err); } };