{"action":"closed","issue":{"url":"https://api.github.com/repos/bjornharrtell/jsts/issues/268","repository_url":"https://api.github.com/repos/bjornharrtell/jsts","labels_url":"https://api.github.com/repos/bjornharrtell/jsts/issues/268/labels{/name}","comments_url":"https://api.github.com/repos/bjornharrtell/jsts/issues/268/comments","events_url":"https://api.github.com/repos/bjornharrtell/jsts/issues/268/events","html_url":"https://github.com/bjornharrtell/jsts/issues/268","id":154889704,"number":268,"title":"GeoJSONWriter throws error when trying to write certain geometries","user":{"login":"evansiroky","id":3112493,"avatar_url":"https://avatars.githubusercontent.com/u/3112493?v=3","gravatar_id":"","url":"https://api.github.com/users/evansiroky","html_url":"https://github.com/evansiroky","followers_url":"https://api.github.com/users/evansiroky/followers","following_url":"https://api.github.com/users/evansiroky/following{/other_user}","gists_url":"https://api.github.com/users/evansiroky/gists{/gist_id}","starred_url":"https://api.github.com/users/evansiroky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansiroky/subscriptions","organizations_url":"https://api.github.com/users/evansiroky/orgs","repos_url":"https://api.github.com/users/evansiroky/repos","events_url":"https://api.github.com/users/evansiroky/events{/privacy}","received_events_url":"https://api.github.com/users/evansiroky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bjornharrtell/jsts/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"bjornharrtell","id":141030,"avatar_url":"https://avatars.githubusercontent.com/u/141030?v=3","gravatar_id":"","url":"https://api.github.com/users/bjornharrtell","html_url":"https://github.com/bjornharrtell","followers_url":"https://api.github.com/users/bjornharrtell/followers","following_url":"https://api.github.com/users/bjornharrtell/following{/other_user}","gists_url":"https://api.github.com/users/bjornharrtell/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornharrtell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornharrtell/subscriptions","organizations_url":"https://api.github.com/users/bjornharrtell/orgs","repos_url":"https://api.github.com/users/bjornharrtell/repos","events_url":"https://api.github.com/users/bjornharrtell/events{/privacy}","received_events_url":"https://api.github.com/users/bjornharrtell/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/bjornharrtell/jsts/milestones/25","html_url":"https://github.com/bjornharrtell/jsts/milestones/1.1.2","labels_url":"https://api.github.com/repos/bjornharrtell/jsts/milestones/25/labels","id":1729883,"number":25,"title":"1.1.2","description":"","creator":{"login":"bjornharrtell","id":141030,"avatar_url":"https://avatars.githubusercontent.com/u/141030?v=3","gravatar_id":"","url":"https://api.github.com/users/bjornharrtell","html_url":"https://github.com/bjornharrtell","followers_url":"https://api.github.com/users/bjornharrtell/followers","following_url":"https://api.github.com/users/bjornharrtell/following{/other_user}","gists_url":"https://api.github.com/users/bjornharrtell/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornharrtell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornharrtell/subscriptions","organizations_url":"https://api.github.com/users/bjornharrtell/orgs","repos_url":"https://api.github.com/users/bjornharrtell/repos","events_url":"https://api.github.com/users/bjornharrtell/events{/privacy}","received_events_url":"https://api.github.com/users/bjornharrtell/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2016-04-25T18:10:00Z","updated_at":"2016-05-15T08:33:29Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-15T04:29:49Z","updated_at":"2016-05-15T08:33:29Z","closed_at":"2016-05-15T08:33:29Z","body":"Here is an example:\r\n\r\n```javascript\r\nvar jsts = require('jsts')\r\n\r\nvar geoJsonReader = new jsts.io.GeoJSONReader(),\r\n  geoJsonWriter = new jsts.io.GeoJSONWriter()\r\n\r\nvar gjA = { \r\n  type: \"MultiPolygon\",\r\n  coordinates: [\r\n    [\r\n      [\r\n        [\r\n          98.17728767261508,\r\n          28.17246370445825\r\n        ],\r\n        [\r\n          93.07752990722656,\r\n          45.0162239074707\r\n        ],\r\n        [\r\n          93.10541534423828,\r\n          45.00222396850586\r\n        ],\r\n        [\r\n          93.11858367919922,\r\n          45.0006103515625\r\n        ],\r\n        [\r\n          93.12930297851562,\r\n          45\r\n        ],\r\n        [\r\n          93.13925170898438,\r\n          45\r\n        ],\r\n        [\r\n          93.14794158935547,\r\n          45.000999450683594\r\n        ],\r\n        [\r\n          93.15666961669922,\r\n          45.0033073425293\r\n        ],\r\n        [\r\n          93.17333221435547,\r\n          45.00763702392578\r\n        ],\r\n        [\r\n          98.17728767261508,\r\n          28.17246370445825\r\n        ]\r\n      ]\r\n    ]\r\n  ]\r\n}\r\n\r\nvar gjB = {\r\n  type: \"Polygon\",\r\n  coordinates: [\r\n    [\r\n      [\r\n        90,\r\n        45\r\n      ],\r\n      [\r\n        90,\r\n        67.5\r\n      ],\r\n      [\r\n        135,\r\n        67.5\r\n      ],\r\n      [\r\n        135,\r\n        45\r\n      ],\r\n      [\r\n        90,\r\n        45\r\n      ]\r\n    ]\r\n  ]\r\n}\r\n\r\nvar _a = geoJsonReader.read(JSON.stringify(gjA)),\r\n  _b = geoJsonReader.read(JSON.stringify(gjB))\r\n\r\nvar result = jsts.operation.overlay.OverlayOp.intersection(_a, _b)\r\n\r\nresult = geoJsonWriter.write(result)  // throws error\r\n```\r\n\r\nI'm getting this error:\r\n```\r\nTypeError: Cannot read property 'apply' of undefined\r\n    at bi.Eo.GeometryCollection (...node_modules\\jsts\\dist\\jsts.min.js:15:4355)\r\n    at bi.e.write (...node_modules\\jsts\\dist\\jsts.min.js:15:1281)\r\n    at _i.e.write (...node_modules\\jsts\\dist\\jsts.min.js:15:4904)\r\n    at Object.<anonymous> (temp.js:89:24)\r\n    at Module._compile (module.js:435:26)\r\n    at Object.Module._extensions..js (module.js:442:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Function.Module.runMain (module.js:467:10)\r\n    at startup (node.js:136:18)\r\n```"}}