|
|
|
"(function (root, factory) {\r\n\r\n // Node.\r\n if(typeof module === 'object' && typeof module.exports === 'object') {\r\n exports = module.exports = factory(require(\"terraformer\"));\r\n } else if(typeof navigator === \"object\") {\r\n // Browser Global.\r\n if (!root.Terraformer){\r\n throw new Error(\"Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer\")\r\n }\r\n root.Terraformer.WKT = factory(root.Terraformer);\r\n }\r\n\r\n}(this, function(Terraformer) {\r\n var exports = { };\r\n\r\n /* Jison generated parser */\r\nvar parser = (function(){\r\nvar parser = {trace: function trace () { },\r\nyy: {},\r\nsymbols_: {\"error\":2,\"expressions\":3,\"point\":4,\"EOF\":5,\"linestring\":6,\"polygon\":7,\"multipoint\":8,\"multilinestring\":9,\"multipolygon\":10,\"coordinate\":11,\"DOUBLE_TOK\":12,\"ptarray\":13,\"COMMA\":14,\"ring_list\":15,\"ring\":16,\"(\":17,\")\":18,\"POINT\":19,\"Z\":20,\"ZM\":21,\"M\":22,\"EMPTY\":23,\"point_untagged\":24,\"polygon_list\":25,\"polygon_untagged\":26,\"point_list\":27,\"LINESTRING\":28,\"POLYGON\":29,\"MULTIPOINT\":30,\"MULTILINESTRING\":31,\"MULTIPOLYGON\":32,\"$accept\":0,\"$end\":1},\r\nterminals_: {2:\"error\",5:\"EOF\",12:\"DOUBLE_TOK\",14:\"COMMA\",17:\"(\",18:\")\",19:\"POINT\",20:\"Z\",21:\"ZM\",22:\"M\",23:\"EMPTY\",28:\"LINESTRING\",29:\"POLYGON\",30:\"MULTIPOINT\",31:\"MULTILINESTRING\",32:\"MULTIPOLYGON\"},\r\nproductions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]],\r\nperformAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$\r\n) {\r\n\r\nvar $0 = $.length - 1;\r\nswitch (yystate) {\r\ncase 1: return $[$0-1]; \r\nbreak;\r\ncase 2: return $[$0-1]; \r\nbreak;\r\ncase 3: return $[$0-1]; \r\nbreak;\r\ncase 4: return $[$0-1]; \r\nbreak;\r\ncase 5: return $[$0-1]; \r\nbreak;\r\ncase 6: return $[$0-1]; \r\nbreak;\r\ncase 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); \r\nbreak;\r\ncase 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); \r\nbreak;\r\ncase 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); \r\nbreak;\r\ncase 10: this.$ = $[$0-2].addPoint($[$0]); \r\nbreak;\r\ncase 11: this.$ = $[$0]; \r\nbreak;\r\ncase 12: this.$ = $[$0-2].addRing($[$0]); \r\nbreak;\r\ncase 13: this.$ = new RingList($[$0]); \r\nbreak;\r\ncase 14: this.$ = new Ring($[$0-1]); \r\nbreak;\r\ncase 15: this.$ = { \"type\": \"Point\", \"coordinates\": $[$0-1].data[0] }; \r\nbreak;\r\ncase 16: this.$ = { \"type\": \"Point\", \"coordinates\": $[$0-1].data[0], \"properties\": { z: true } }; \r\nbreak;\r\ncase 17: this.$ = { \"type\": \"Point\", \"coordinates\": $[$0-1].data[0], \"properties\": { z: true, m: true } }; \r\nbreak;\r\ncase 18: this.$ = { \"type\": \"Point\", \"coordinates\": $[$0-1].data[0], \"properties\": { m: true } }; \r\nbreak;\r\ncase 19: this.$ = { \"type\": \"Point\", \"coordinates\": [ ] }; \r\nbreak;\r\ncase 20: this.$ = $[$0]; \r\nbreak;\r\ncase 21: this.$ = $[$0-1]; \r\nbreak;\r\ncase 22: this.$ = $[$0-2].addPolygon($[$0]); \r\nbreak;\r\ncase 23: this.$ = new PolygonList($[$0]); \r\nbreak;\r\ncase 24: this.$ = $[$0-1]; \r\nbreak;\r\ncase 25: this.$ = $[$0-2].addPoint($[$0]); \r\nbreak;\r\ncase 26: this.$ = $[$0]; \r\nbreak;\r\ncase 27: this.$ = { \"type\": \"LineString\", \"coordinates\": $[$0-1].data }; \r\nbreak;\r\ncase 28: this.$ = { \"type\": \"LineString\", \"coordinates\": $[$0-1].data, \"properties\": { z: true } }; \r\nbreak;\r\ncase 29: this.$ = { \"type\": \"LineString\", \"coordinates\": $[$0-1].data, \"properties\": { m: true } }; \r\nbreak;\r\ncase 30: this.$ = { \"type\": \"LineString\", \"coordinates\": $[$0-1].data, \"properties\": { z: true, m: true } }; \r\nbreak;\r\ncase 31: this.$ = { \"type\": \"LineStr
|