├── .gitignore ├── LICENSE ├── README.md ├── RouteOld.js ├── StationList.txt ├── firebase.json └── functions ├── .eslintrc.json ├── functions ├── lines │ ├── aqua.json │ ├── blue.json │ ├── bluebranch.json │ ├── green.json │ ├── greenbranch.json │ ├── grey.json │ ├── magenta.json │ ├── orange.json │ ├── pink.json │ ├── pinkbranch.json │ ├── rapid.json │ ├── rapidloop.json │ ├── red.json │ ├── station_entity.json │ ├── violet.json │ └── yellow.json ├── route copy.js ├── route.js └── stations.js ├── index.js ├── package.json └── station.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | *.DS_Store 4 | *.log 5 | .firebaserc 6 | package-lock.json 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Delhi Metro API 2 | A Javascript based API for calculating the shortest path between two metro stations. 3 | 4 | ## Data Sources 5 | Data about stations per line is downloaded from Wikipedia tables (https://en.wikipedia.org/wiki/Red_Line_(Delhi_Metro)), etc. for each line. 6 | 7 | ## Working 8 | The metro lines are implemented in a Graph Data Structure in Javascript. 9 | Each station is considered as a node and time between stations is alloted as the weights between two nodes. 10 | An additional parameter "Metro line" is given to each edge. 11 | Dijkstra's algorithm is used to find the route with the least time between two stations. 12 | Changes of the Metro Line parameters are used to calculate interchanges and include the interchange time. 13 | 14 | ## Hierarchy 15 | functions/functions/route.js contains the code importing the lines with stations and calculating the shortest route. The folder functions/functions/lines contains the json files of the stations of all metro lines. 16 | 17 | ## Lines Implemented 18 | The following lines have been implemented (in order):
19 | ->Blue : 2.02 minutes
20 | ->Blue Branch : 1.875 minutes
21 | ->Magenta : 2.36 minutes
22 | ->Yellow : 2.22 minutes
23 | ->Red : 2.03 minutes
24 | ->Green : 2.49 minutes
25 | ->Green Branch : 1.33 minutes
26 | ->Violet : 2.24 minutes
27 | ->Pink : 2.69 minutes
28 | ->Pink Branch : 2.43 minutes
29 | ->Orange (Airport Express Line) : 5.2 minutes
30 | ->Aqua : 2.86 minutes
31 | ->Grey : 2.10 minutes
32 | ->Rapid Metro : 5.2 minutes
33 | ## Features 34 | ->Get shortest complete path from Source Station to Destination Station
35 | ->Get list of Interchange Stations in order
36 | ->Get Metro Lines Changed
37 | ->Get Total Travel Time
38 | ->Get Final Station of Metro Line in direction of destination/next interchange
39 | 40 | ## Status Codes 41 | Status codes are returned in the response in JSON format as 'status':statusCode. The value of different status codes are:
42 | Result succesfully generated: 200
43 | Same source and destination: 204
44 | Undefined source or destination: 400
45 | Invalid source: 4061
46 | Invalid destination: 4062
47 | Invalid source and destination: 406
48 | Please note that these status codes are returned in the JSON response and not as HTTP status codes 49 | 50 | ## API Calling 51 | The API is hosted on Google Firebase, and can be called at:
52 | https://us-central1-delhimetroapi.cloudfunctions.net/route-get 53 | with a GET query and parameters as from (source station) and to (destination station).
54 | For example, the API call for a route between Dwarka and Palam would be: https://us-central1-delhimetroapi.cloudfunctions.net/route-get?from=Dwarka&to=Palam.
55 | The stations to be passed in the parameters must start with a capital letter. The stations must be passed as they are written in the /StationList.txt file. 56 | -------------------------------------------------------------------------------- /RouteOld.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | //QUEUE CLASS 4 | class PriorityQueue { 5 | constructor() { 6 | this.collection = []; 7 | } 8 | enqueue(element) { 9 | if (this.isEmpty()) { 10 | this.collection.push(element); 11 | } else { 12 | let added = false; 13 | for (let i = 1; i <= this.collection.length; i++) { 14 | if (element[1] < this.collection[i - 1][1]) { 15 | this.collection.splice(i - 1, 0, element); 16 | added = true; 17 | break; 18 | } 19 | } 20 | if (!added) { 21 | this.collection.push(element); 22 | } 23 | } 24 | }; 25 | dequeue() { 26 | let value = this.collection.shift(); 27 | return value; 28 | }; 29 | isEmpty() { 30 | return (this.collection.length === 0) 31 | }; 32 | } 33 | 34 | 35 | class Graph { 36 | constructor() { 37 | this.nodes = []; 38 | this.adjacencyList = {}; 39 | } 40 | 41 | addNode(node) { 42 | this.nodes.push(node); 43 | this.adjacencyList[node] = []; 44 | } 45 | 46 | addEdge(node1, node2, weight, color) { 47 | this.adjacencyList[node1].push({ node: node2, weight: weight, line: color }); 48 | this.adjacencyList[node2].push({ node: node1, weight: weight, line: color }); 49 | } 50 | 51 | //Djikstra 52 | shortestRoute(startNode, endNode) { 53 | console.log("--Directions from " + startNode + " to " + endNode + "--\n"); 54 | let times = {}; 55 | var change = []; 56 | let backtrace = {}; 57 | let pq = new PriorityQueue(); 58 | times[startNode] = 0; 59 | this.nodes.forEach(node => { 60 | if (node !== startNode) { 61 | times[node] = Infinity 62 | } 63 | }); 64 | pq.enqueue([startNode, 0]); 65 | while (!pq.isEmpty()) { 66 | let shortestStep = pq.dequeue(); 67 | let currentNode = shortestStep[0]; 68 | this.adjacencyList[currentNode].forEach(neighbor => { 69 | let time = times[currentNode] + neighbor.weight; 70 | if (currentNode != startNode) { 71 | if (this.getline(currentNode, neighbor.node) != this.getline(currentNode, backtrace[currentNode])) { 72 | if (this.getline(currentNode, neighbor.node) == "1.2km Skywalk" || this.getline(currentNode, backtrace[currentNode]) == "1.2km Skywalk") 73 | time = time + 0; 74 | else 75 | time = time + 13; 76 | } 77 | } 78 | 79 | if (time < times[neighbor.node]) { 80 | times[neighbor.node] = time; 81 | backtrace[neighbor.node] = currentNode; 82 | pq.enqueue([neighbor.node, time]); 83 | } 84 | }); 85 | } 86 | let path = [endNode]; 87 | let lastStep = endNode; 88 | 89 | class all { 90 | constructor() { 91 | this.line1 = []; 92 | this.line2 = []; 93 | this.interchange = []; 94 | this.lineEnds = []; 95 | this.path; 96 | this.time; 97 | } 98 | } 99 | var result = new all(); 100 | var count = 0; 101 | while (lastStep !== startNode) { 102 | if (this.getline(lastStep, backtrace[lastStep]) != this.getline(backtrace[lastStep], backtrace[backtrace[lastStep]])) 103 | if (backtrace[lastStep] == startNode) 104 | ; 105 | else { 106 | result.line1.unshift(this.getline(backtrace[lastStep], backtrace[backtrace[lastStep]])); 107 | result.line2.unshift(this.getline(lastStep, backtrace[lastStep])) 108 | result.interchange.unshift(backtrace[lastStep]); 109 | count++; 110 | } 111 | console.log(result.interchange); 112 | path.unshift(backtrace[lastStep]) 113 | lastStep = backtrace[lastStep] 114 | } 115 | result.path = path; 116 | result.time = times[endNode]; 117 | 118 | if (result.interchange.length == 0) 119 | result.line1[0] = this.getline(result.path[0], result.path[1]); 120 | result.lineEnds = getLast(result.path, result.interchange, result.line1, result.line2) 121 | return result; 122 | 123 | } 124 | 125 | printGraph(sta) { 126 | console.log("--Adjacency List Of " + sta + "--") 127 | for (var i = 0; i < this.adjacencyList[sta].length; i++) 128 | console.log(this.adjacencyList[sta][i].line); 129 | } 130 | 131 | getline(sta1, sta2) { 132 | for (var i = 0; i < this.adjacencyList[sta1].length; i++) { 133 | if (this.adjacencyList[sta1][i].node == sta2) 134 | return (this.adjacencyList[sta1][i].line); 135 | } 136 | } 137 | 138 | } 139 | 140 | 141 | function lineChoose(linein) { 142 | if (linein == 'blue') 143 | line = blueline; 144 | else if (linein == 'bluebranch') 145 | line = bluebranchline; 146 | else if (linein == 'magenta') 147 | line = magentaline; 148 | else if (linein == 'yellow') 149 | line = yellowline; 150 | else if (linein == 'violet') 151 | line = violetline; 152 | else if (linein == 'red') 153 | line = redline; 154 | else if (linein == 'green') 155 | line = greenline; 156 | else if (linein == 'greenbranch') 157 | line = greenbranchline; 158 | else if (linein == 'pink') 159 | line = pinkline; 160 | else if (linein == 'pinkbranch') 161 | line = pinkbranchline; 162 | else if (linein == 'orange') 163 | line = orangeline; 164 | return line; 165 | } 166 | 167 | function getLast(path, interchange, line1, line2) { 168 | 169 | var line 170 | var linein 171 | var out = []; 172 | linein = line1[0] 173 | line = lineChoose(linein) 174 | out.push(getLastCalcStart(line, path, interchange)); 175 | for (var i = 0; i < (line2.length); i++) { 176 | linein = line2[i] 177 | line = lineChoose(linein) 178 | out.push(getLastCalc(line, path, interchange[i], interchange[i + 1])) 179 | } 180 | return out 181 | } 182 | 183 | 184 | 185 | function getLastCalc(line, path, interchange, nextInterchange) { 186 | var startPos = 1000 187 | var endPos = 1000 188 | 189 | for (var j = 0; j <= line.length; j++) { 190 | if (line[j] == interchange) 191 | startPos = j; 192 | if (nextInterchange == undefined) { 193 | if (line[j] == path[path.length]) 194 | endPos = j; 195 | } 196 | else if (line[j] == nextInterchange) { 197 | endPos = j; 198 | } 199 | } 200 | if (endPos < startPos) 201 | return line[0] 202 | else 203 | return line[line.length - 1]; 204 | } 205 | 206 | 207 | 208 | function getLastCalcStart(line, path, interchange) { 209 | for (var i = 0; i <= line.length; i++) { 210 | if (line[i] == path[0]) 211 | startPos = i; 212 | if (line[i] == interchange[0]) 213 | endPos = i; 214 | } 215 | if (endPos < startPos) 216 | return line[0] 217 | else 218 | return line[line.length - 1]; 219 | } 220 | 221 | let g = new Graph(); 222 | 223 | app.get('/route', (req, res) => { 224 | let to = req.query.to 225 | let from = req.query.from 226 | result = g.shortestRoute(from, to); 227 | console.log(result) 228 | 229 | res.send(result) 230 | }) 231 | 232 | 233 | var blueline = []; 234 | var bluebranchline = []; 235 | var magentaline = []; 236 | var yellowline = []; 237 | var violetline = []; 238 | var redline = []; 239 | var greenline = []; 240 | var greenbranchline = []; 241 | var pinkline = []; 242 | var pinkbranchline = []; 243 | var orangeline = []; 244 | 245 | 246 | function importlines() { 247 | // 248 | //METRO LINES 249 | // 250 | 251 | 252 | 253 | //Blue Line 254 | 255 | blue = require("./lines/blue.json"); 256 | 257 | for (var i = 0; i < 50; i++) { 258 | blueline[i] = blue[i]["Hindi"]; 259 | } 260 | 261 | for (var i = 0; i < blueline.length; i++) { 262 | g.addNode(blueline[i]); 263 | } 264 | 265 | for (var i = 0; i < 49; i++) { 266 | g.addEdge(blueline[i], blueline[i + 1], 2.02, "blue"); 267 | } 268 | 269 | 270 | 271 | //BlueBranch 272 | bluebranch = require("./lines/bluebranch.json"); 273 | 274 | for (var i = 0; i < 11; i++) { 275 | 276 | bluebranchline[i] = bluebranch[i]["Hindi"]; 277 | } 278 | 279 | for (var i = 0; i < bluebranchline.length; i++) { 280 | //Skip Interchange 281 | if (bluebranchline[i] == 'Yamuna Bank') 282 | continue; 283 | else 284 | g.addNode(bluebranchline[i]); 285 | } 286 | 287 | for (var i = 0; i < 10; i++) { 288 | g.addEdge(bluebranchline[i], bluebranchline[i + 1], 1.875, "bluebranch"); 289 | } 290 | 291 | //Magenta 292 | magenta = require("./lines/magenta.json"); 293 | 294 | for (var i = 0; i < magenta.length; i++) { 295 | magentaline[i] = magenta[i]["25"]; 296 | } 297 | for (var i = 0; i < magentaline.length; i++) { 298 | //Skip Interchange 299 | if (magentaline[i] == 'Janakpuri West') 300 | continue; 301 | if (magentaline[i] == 'Botanical Garden') 302 | continue; 303 | else 304 | g.addNode(magentaline[i]); 305 | } 306 | for (var i = 0; i < (magentaline.length - 1); i++) { 307 | g.addEdge(magentaline[i], magentaline[i + 1], 2.36, "magenta"); 308 | } 309 | 310 | //Yellow Line 311 | yellow = require("./lines/yellow.json"); 312 | 313 | for (var i = 0; i < yellow.length; i++) { 314 | yellowline[i] = yellow[i]["Hindi"]; 315 | } 316 | for (var i = 0; i < yellowline.length; i++) { 317 | if (yellowline[i] == 'Hauz Khas' || yellowline[i] == 'Rajiv Chowk') 318 | continue; 319 | else 320 | g.addNode(yellowline[i]); 321 | } 322 | for (var i = 0; i < (yellowline.length - 1); i++) { 323 | g.addEdge(yellowline[i], yellowline[i + 1], 2.22, "yellow"); 324 | } 325 | 326 | 327 | //Violet Line 328 | violet = require("./lines/violet.json"); 329 | 330 | for (var i = 0; i < violet.length; i++) { 331 | 332 | violetline[i] = violet[i]["Hindi"]; 333 | } 334 | for (var i = 0; i < violetline.length; i++) { 335 | if (violetline[i] == 'Kashmere Gate' || violetline[i] == 'Mandi House' || violetline[i] == 'Central Secretariat' || violetline[i] == 'Kalkaji Mandir') 336 | continue; 337 | else 338 | g.addNode(violetline[i]); 339 | } 340 | for (var i = 0; i < (violetline.length - 1); i++) { 341 | g.addEdge(violetline[i], violetline[i + 1], 2.24, "violet"); 342 | } 343 | 344 | 345 | 346 | //red Line 347 | red = require("./lines/red.json"); 348 | 349 | for (var i = 0; i < red.length; i++) { 350 | 351 | redline[i] = red[i]["Hindi"]; 352 | } 353 | for (var i = 0; i < redline.length; i++) { 354 | if (redline[i] == 'Kashmere Gate') 355 | continue; 356 | else 357 | g.addNode(redline[i]); 358 | } 359 | for (var i = 0; i < (redline.length - 1); i++) { 360 | g.addEdge(redline[i], redline[i + 1], 2.03, "red"); 361 | } 362 | 363 | 364 | 365 | //green Line 366 | green = require("./lines/green.json"); 367 | 368 | for (var i = 0; i < green.length; i++) { 369 | greenline[i] = green[i]["Hindi"]; 370 | } 371 | for (var i = 0; i < greenline.length; i++) { 372 | if (greenline[i] == 'Inderlok') 373 | continue; 374 | else 375 | g.addNode(greenline[i]); 376 | } 377 | for (var i = 0; i < (greenline.length - 1); i++) { 378 | g.addEdge(greenline[i], greenline[i + 1], 2.49, "green"); 379 | } 380 | 381 | 382 | //greenbranch Line 383 | greenbranch = require("./lines/greenbranch.json"); 384 | 385 | for (var i = 0; i < greenbranch.length; i++) { 386 | greenbranchline[i] = greenbranch[i]["Hindi"]; 387 | } 388 | for (var i = 0; i < greenbranchline.length; i++) { 389 | if (greenbranchline[i] == 'Kirti Nagar' || greenbranchline[i] == 'Ashok Park Main') 390 | continue; 391 | else 392 | g.addNode(greenbranchline[i]); 393 | } 394 | for (var i = 0; i < (greenbranchline.length - 1); i++) { 395 | g.addEdge(greenbranchline[i], greenbranchline[i + 1], 1.33, "greenbranch"); 396 | } 397 | 398 | //pink Line 399 | pink = require("./lines/pink.json"); 400 | 401 | for (var i = 0; i < pink.length; i++) { 402 | pinkline[i] = pink[i]["Hindi"]; 403 | } 404 | for (var i = 0; i < pinkline.length; i++) { 405 | if (pinkline[i] == 'Azadpur' || pinkline[i] == 'Netaji Subhash Place' || pinkline[i] == 'Rajouri Garden' || pinkline[i] == 'INA' || pinkline[i] == 'Lajpat Nagar' || pinkline[i] == 'Mayur Vihar – I') 406 | continue; 407 | else 408 | g.addNode(pinkline[i]); 409 | } 410 | for (var i = 0; i < (pinkline.length - 1); i++) { 411 | g.addEdge(pinkline[i], pinkline[i + 1], 2.69, "pink"); 412 | } 413 | 414 | //pinkbranch Line 415 | pinkbranch = require("./lines/pinkbranch.json"); 416 | 417 | for (var i = 0; i < pinkbranch.length; i++) { 418 | pinkbranchline[i] = pinkbranch[i]["Hindi"]; 419 | } 420 | for (var i = 0; i < pinkbranchline.length; i++) { 421 | if (pinkbranchline[i] == 'Anand Vihar' || pinkbranchline[i] == 'Karkarduma' || pinkbranchline[i] == 'Welcome') 422 | continue; 423 | else 424 | g.addNode(pinkbranchline[i]); 425 | } 426 | for (var i = 0; i < (pinkbranchline.length - 1); i++) { 427 | g.addEdge(pinkbranchline[i], pinkbranchline[i + 1], 2.43, "pinkbranch"); 428 | } 429 | 430 | //Orange 431 | orange = require("./lines/orange.json"); 432 | 433 | for (var i = 0; i < orange.length; i++) { 434 | orangeline[i] = orange[i]["Hindi"]; 435 | } 436 | for (var i = 0; i < orangeline.length; i++) { 437 | if (orangeline[i] == 'New Delhi' || orangeline[i] == 'Dwarka Sector 21') 438 | continue; 439 | else 440 | g.addNode(orangeline[i]); 441 | } 442 | for (var i = 0; i < (orangeline.length - 1); i++) { 443 | g.addEdge(orangeline[i], orangeline[i + 1], 5.2, "orange"); 444 | } 445 | 446 | //Dhaula Kuan - South Campus Connection 447 | g.addEdge("Dhaula Kuan", "Durgabai Deshmukh South Campus", 18, "1.2km Skywalk"); 448 | 449 | } 450 | 451 | importlines(); 452 | 453 | 454 | app.get('/route',(req,res)=>{ 455 | let to= req.query.to 456 | let from= req.query.from 457 | result=g.shortestRoute(from,to); 458 | console.log(result) 459 | res.send(result) 460 | }) 461 | 462 | //ShortestRouteCall 463 | //console.log(g.shortestRoute("Palam", "Model Town").interchange); 464 | 465 | //AdjList of Station 466 | //g.printGraph("Rajouri Garden"); 467 | 468 | 469 | 470 | //NOTE 471 | // 472 | //TRY LISTING IGNORE INTERCHANGE STATION IN ADD NODE ONLY 473 | // 474 | 475 | //Order of Lining: 476 | //Blue 477 | //BlueBranch 478 | //Magenta 479 | //Yellow 480 | //Violet 481 | //Red 482 | //Green 483 | //Green Branch 484 | //Pink 485 | //Pink Branch -------------------------------------------------------------------------------- /StationList.txt: -------------------------------------------------------------------------------- 1 | AIIMS 2 | Adarsh Nagar 3 | Airport 4 | Akshardham 5 | Alpha 1 6 | Anand Vihar 7 | Arjan Garh 8 | Arthala 9 | Ashok Park Main 10 | Ashram 11 | Azadpur 12 | Badarpur 13 | Badkhal Mor 14 | Bahadurgarh City 15 | Barakhambha Road 16 | Bata Chowk 17 | Bhikaji Cama Place 18 | Botanical Garden 19 | Brigadier Hoshiyar Singh 20 | Central Secretariat 21 | Chandni Chowk 22 | Chawri Bazar 23 | Chhatarpur 24 | Chirag Delhi 25 | Civil Lines 26 | Dabri Mor-Janakpuri South 27 | Dashrath Puri 28 | Delhi Aerocity 29 | Delhi Cantonment 30 | Delhi Gate 31 | Delta 1 32 | Depot 33 | Dhaula Kuan 34 | Dilshad Garden 35 | Durgabai Deshmukh South Campus 36 | Dwarka 37 | Dwarka Mor 38 | Dwarka Sector 10 39 | Dwarka Sector 11 40 | Dwarka Sector 12 41 | Dwarka Sector 13 42 | Dwarka Sector 14 43 | Dwarka Sector 21 44 | Dwarka Sector 8 45 | Dwarka Sector 9 46 | ESI Hospital 47 | East Azad Nagar 48 | East Vinod Nagar - Mayur Vihar-II 49 | Escorts Mujesar 50 | Faridabad Old 51 | GNIDA Office 52 | GTB Nagar 53 | Ghevra Metro station 54 | Ghitorni 55 | Gokulpuri 56 | Golf Course 57 | Govind Puri 58 | Greater Kailash 59 | Green Park 60 | Guru Dronacharya 61 | HUDA City Centre 62 | Haiderpur 63 | Harkesh Nagar 64 | Hauz Khas 65 | Hazrat Nizamuddin 66 | Hindon 67 | IFFCO Chowk 68 | IIT Delhi 69 | INA 70 | IP Extension 71 | ITO 72 | Inderlok 73 | Indraprastha 74 | IndusInd Bank Cyber City 75 | Jaffrabad 76 | Jahangirpuri 77 | Jama Masjid 78 | Jamia Millia Islamia 79 | Janakpuri East 80 | Janakpuri West 81 | Jangpura 82 | Janpath 83 | Jasola Apollo 84 | Jasola Vihar Shaheen Bagh 85 | Jawaharlal Nehru Stadium 86 | Jhandewalan 87 | Jhilmil 88 | Johri Enclave 89 | Jor Bagh 90 | Kailash Colony 91 | Kalindi Kunj 92 | Kalkaji Mandir 93 | Kanhiya Nagar 94 | Karkarduma 95 | Karkarduma Court 96 | Karol Bagh 97 | Kashmere Gate 98 | Kaushambi 99 | Keshav Puram 100 | Khan Market 101 | Kirti Nagar 102 | Knowledge Park II 103 | Kohat Enclave 104 | Krishna Nagar 105 | Lajpat Nagar 106 | Lal Qila 107 | Laxmi Nagar 108 | Lok Kalyan Marg 109 | MG Road 110 | Madipur 111 | Majlis Park 112 | Major Mohit Sharma 113 | Malviya Nagar 114 | Mandawali - West Vinod Nagar 115 | Mandi House 116 | Mansarovar Park 117 | Maujpur-Babarpur 118 | Mayapuri 119 | Mayur Vihar - I 120 | Mayur Vihar Extension 121 | Mayur Vihar Pocket I 122 | Mewala Maharajpur 123 | Micromax Moulsari Avenue 124 | Model Town 125 | Mohan Estate 126 | Mohan Nagar 127 | Moolchand 128 | Moti Nagar 129 | Mundka 130 | Mundka Industrial Area 131 | Munirka 132 | NHPC Chowk 133 | NSEZ 134 | Najafgrah 135 | Nangli 136 | Nangloi 137 | Nangloi Railway station 138 | Naraina Vihar 139 | Nawada 140 | Neelam Chowk Ajronda 141 | Nehru Enclave 142 | Nehru Place 143 | Netaji Subhash Place 144 | New Ashok Nagar 145 | New Delhi 146 | Nirman Vihar 147 | Noida City Centre 148 | Noida Electronic City 149 | Noida Sector 101 150 | Noida Sector 137 151 | Noida Sector 142 152 | Noida Sector 143 153 | Noida Sector 144 154 | Noida Sector 145 155 | Noida Sector 146 156 | Noida Sector 147 157 | Noida Sector 148 158 | Noida Sector 15 159 | Noida Sector 16 160 | Noida Sector 18 161 | Noida Sector 34 162 | Noida Sector 50 163 | Noida Sector 51 164 | Noida Sector 52 165 | Noida Sector 59 166 | Noida Sector 61 167 | Noida Sector 62 168 | Noida Sector 76 169 | Noida Sector 81 170 | Noida Sector 83 171 | Okhla Bird Sanctuary 172 | Okhla NSIC 173 | Okhla Vihar 174 | Palam 175 | Panchsheel Park 176 | Pandit Shree Ram Sharma 177 | Pari Chowk 178 | Paschim Vihar East 179 | Paschim Vihar West 180 | Patel Chowk 181 | Patel Nagar 182 | Peera Garhi 183 | Phase 1 184 | Phase 2 185 | Phase 3 186 | Pitam Pura 187 | Pragati Maidan 188 | Pratap Nagar 189 | Preet Vihar 190 | Pul Bangash 191 | Punjabi Bagh 192 | Punjabi Bagh West 193 | Qutub Minar 194 | R.K.Puram 195 | Raj Bagh 196 | Raja Nahar Singh 197 | Rajdhani Park 198 | Rajendra Place 199 | Rajiv Chowk 200 | Rajouri Garden 201 | Ramakrishna Ashram Marg 202 | Ramesh Nagar 203 | Rithala 204 | Rohini East 205 | Rohini Sector 18 206 | Rohini West 207 | Sadar Bazaar Cantonment 208 | Saket 209 | Samaypur Badli 210 | Sant Surdas 211 | Sarai 212 | Sarita Vihar 213 | Sarojini Nagar 214 | Satguru Ram Singh Marg 215 | Sector 28 216 | Sector 42-43 217 | Sector 53-54 218 | Sector 54 Chowk 219 | Sector 55–56 220 | Seelampur 221 | Shadipur 222 | Shahdara 223 | Shaheed Nagar 224 | Shaheed Sthal 225 | Shakurpur 226 | Shalimar Bagh 227 | Shankar Vihar 228 | Shastri Nagar 229 | Shastri Park 230 | Shiv Vihar 231 | Shivaji Park 232 | Shivaji Stadium 233 | Shyam park 234 | Sikandarpur 235 | Sir Vishweshwaraiah Moti Bagh 236 | South Extension 237 | Subhash Nagar 238 | Sukhdev Vihar 239 | Sultanpur 240 | Surajmal Stadium 241 | Tagore Garden 242 | Terminal 1-IGI Airport 243 | Tikri Border 244 | Tikri Kalan 245 | Tilak Nagar 246 | Tis Hazari 247 | Trilokpuri Sanjay Lake 248 | Tughlakabad 249 | Udyog Bhawan 250 | Udyog Nagar 251 | Uttam Nagar East 252 | Uttam Nagar West 253 | Vaishali 254 | Vasant Vihar 255 | Vidhan Sabha 256 | Vinobapuri 257 | Vishwa Vidyalaya 258 | Vodafone Belvedere Towers 259 | Welcome 260 | Yamuna Bank -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /functions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 7, 4 | "sourceType": "script" 5 | }, 6 | "extends": ["google"], 7 | "env": { 8 | "node": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /functions/functions/lines/aqua.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "8": "Elevated", 4 | "English": "1", 5 | "Hindi": "Noida Sector 51", 6 | "Total length in metres": "नोएडा सेक्टर ५१", 7 | "Interstation distance in metres": "0.000", 8 | "Inauguration Date": "0.000", 9 | "Connections": "25 January 2019", 10 | "Layout": "Blue Line" 11 | }, 12 | { 13 | "8": "Elevated", 14 | "English": "2", 15 | "Hindi": "Noida Sector 50", 16 | "Total length in metres": "नोएडा सेक्टर ५०", 17 | "Interstation distance in metres": "1041.5", 18 | "Inauguration Date": "1041.5", 19 | "Connections": "25 January 2019", 20 | "Layout": "None" 21 | }, 22 | { 23 | "8": "Elevated", 24 | "English": "3", 25 | "Hindi": "Noida Sector 76", 26 | "Total length in metres": "नोएडा सेक्टर ७६", 27 | "Interstation distance in metres": "2095.0", 28 | "Inauguration Date": "1053.5", 29 | "Connections": "25 January 2019", 30 | "Layout": "None" 31 | }, 32 | { 33 | "8": "Elevated", 34 | "English": "4", 35 | "Hindi": "Noida Sector 101", 36 | "Total length in metres": "नोएडा सेक्टर १०१", 37 | "Interstation distance in metres": "3105.2", 38 | "Inauguration Date": "1010.2", 39 | "Connections": "25 January 2019", 40 | "Layout": "None" 41 | }, 42 | { 43 | "8": "Elevated", 44 | "English": "5", 45 | "Hindi": "Noida Sector 81", 46 | "Total length in metres": "नोएडा सेक्टर ८१", 47 | "Interstation distance in metres": "4228.9", 48 | "Inauguration Date": "1123.7", 49 | "Connections": "25 January 2019", 50 | "Layout": "None" 51 | }, 52 | { 53 | "8": "Elevated", 54 | "English": "6", 55 | "Hindi": "NSEZ", 56 | "Total length in metres": "एन॰एस॰ई॰ज़ेड॰", 57 | "Interstation distance in metres": "5153.3", 58 | "Inauguration Date": "924.4", 59 | "Connections": "25 January 2019", 60 | "Layout": "None" 61 | }, 62 | { 63 | "8": "Elevated", 64 | "English": "7", 65 | "Hindi": "Noida Sector 83", 66 | "Total length in metres": "नोएडा सेक्टर८३", 67 | "Interstation distance in metres": "7130", 68 | "Inauguration Date": "1976.7", 69 | "Connections": "25 January 2019", 70 | "Layout": "None" 71 | }, 72 | { 73 | "8": "Elevated", 74 | "English": "8", 75 | "Hindi": "Noida Sector 137", 76 | "Total length in metres": "नोएडा सेक्टर १३७", 77 | "Interstation distance in metres": "8279.4", 78 | "Inauguration Date": "1149.4", 79 | "Connections": "25 January 2019", 80 | "Layout": "None" 81 | }, 82 | { 83 | "8": "Elevated", 84 | "English": "9", 85 | "Hindi": "Noida Sector 142", 86 | "Total length in metres": "नोएडा 4सेक्टर १४२", 87 | "Interstation distance in metres": "9631.1", 88 | "Inauguration Date": "1351.7", 89 | "Connections": "25 January 2019", 90 | "Layout": "None" 91 | }, 92 | { 93 | "8": "Elevated", 94 | "English": "10", 95 | "Hindi": "Noida Sector 143", 96 | "Total length in metres": "नोएडा सेक्टर 1४३", 97 | "Interstation distance in metres": "11279.1", 98 | "Inauguration Date": "1648.0", 99 | "Connections": "25 January 2019", 100 | "Layout": "None" 101 | }, 102 | { 103 | "8": "Elevated", 104 | "English": "11", 105 | "Hindi": "Noida Sector 144", 106 | "Total length in metres": "नोएडा सेक्टर १४४", 107 | "Interstation distance in metres": "12500.6", 108 | "Inauguration Date": "1221.5", 109 | "Connections": "25 January 2019", 110 | "Layout": "None" 111 | }, 112 | { 113 | "8": "Elevated", 114 | "English": "12", 115 | "Hindi": "Noida Sector 145", 116 | "Total length in metres": "नोएडा सेक्टर १४५", 117 | "Interstation distance in metres": "13852.8", 118 | "Inauguration Date": "1352.2", 119 | "Connections": "25 January 2019", 120 | "Layout": "None" 121 | }, 122 | { 123 | "8": "Elevated", 124 | "English": "13", 125 | "Hindi": "Noida Sector 146", 126 | "Total length in metres": "नोएडा सेक्टर १५३", 127 | "Interstation distance in metres": "15084.1", 128 | "Inauguration Date": "1231.3", 129 | "Connections": "25 January 2019", 130 | "Layout": "None" 131 | }, 132 | { 133 | "8": "Elevated", 134 | "English": "14", 135 | "Hindi": "Noida Sector 147", 136 | "Total length in metres": "नोएडा सेक्टर १४७", 137 | "Interstation distance in metres": "16617.1", 138 | "Inauguration Date": "1533.0", 139 | "Connections": "25 January 2019", 140 | "Layout": "None" 141 | }, 142 | { 143 | "8": "Elevated", 144 | "English": "15", 145 | "Hindi": "Noida Sector 148", 146 | "Total length in metres": "नोएडा सेक्टर १४८", 147 | "Interstation distance in metres": "", 148 | "Inauguration Date": "", 149 | "Connections": "25 January 2019", 150 | "Layout": "None" 151 | }, 152 | { 153 | "8": "Elevated", 154 | "English": "16", 155 | "Hindi": "Knowledge Park II", 156 | "Total length in metres": "नॉलेज पार्क II", 157 | "Interstation distance in metres": "19910.6", 158 | "Inauguration Date": "3293.5", 159 | "Connections": "25 January 2019", 160 | "Layout": "None" 161 | }, 162 | { 163 | "8": "Elevated", 164 | "English": "17", 165 | "Hindi": "Pari Chowk", 166 | "Total length in metres": "परी चौक", 167 | "Interstation distance in metres": "22239", 168 | "Inauguration Date": "2328.4", 169 | "Connections": "25 January 2019", 170 | "Layout": "None" 171 | }, 172 | { 173 | "8": "Elevated", 174 | "English": "18", 175 | "Hindi": "Alpha 1", 176 | "Total length in metres": "एल्फा १", 177 | "Interstation distance in metres": "24010.8", 178 | "Inauguration Date": "921.8", 179 | "Connections": "25 January 2019", 180 | "Layout": "None" 181 | }, 182 | { 183 | "8": "Elevated", 184 | "English": "19", 185 | "Hindi": "Delta 1", 186 | "Total length in metres": "डेल्टा १", 187 | "Interstation distance in metres": "25096.7", 188 | "Inauguration Date": "1085.9", 189 | "Connections": "25 January 2019", 190 | "Layout": "None" 191 | }, 192 | { 193 | "8": "Elevated", 194 | "English": "20", 195 | "Hindi": "GNIDA Office", 196 | "Total length in metres": "ग्रेनो ऑफिस", 197 | "Interstation distance in metres": "26182.6", 198 | "Inauguration Date": "1855.8", 199 | "Connections": "25 January 2019", 200 | "Layout": "None" 201 | }, 202 | { 203 | "8": "Elevated", 204 | "English": "21", 205 | "Hindi": "Depot", 206 | "Total length in metres": "डिपो", 207 | "Interstation distance in metres": "27881.4", 208 | "Inauguration Date": "1699.0", 209 | "Connections": "25 January 2019", 210 | "Layout": "None" 211 | } 212 | ] -------------------------------------------------------------------------------- /functions/functions/lines/blue.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "10": "Elevated", 4 | "English": "1", 5 | "Hindi": "Noida Electronic City", 6 | "Phase": "नोएडा इलैक्ट्रौनिक सिटी", 7 | "Opening": "3", 8 | "Interchange\nConnection": "9 March 2019", 9 | "Station Layout": "Bus Terminal", 10 | "Platform Level Type": "Elevated", 11 | "Depot Connection": "Side", 12 | "Depot Layout": "Noida Electronic City Depot" 13 | }, 14 | { 15 | "English": "2", 16 | "Hindi": "Noida Sector 62", 17 | "Phase": "नोएडा सेक्टर 62", 18 | "Opening": "Feeder Bus", 19 | "Interchange\nConnection": "None", 20 | "Station Layout": "None" 21 | }, 22 | { 23 | "English": "3", 24 | "Hindi": "Noida Sector 59", 25 | "Phase": "नोएडा सेक्टर 59" 26 | }, 27 | { 28 | "English": "4", 29 | "Hindi": "Noida Sector 61", 30 | "Phase": "नोएडा सेक्टर 61" 31 | }, 32 | { 33 | "English": "5", 34 | "Hindi": "Noida Sector 52", 35 | "Phase": "नोएडा सेक्टर 52", 36 | "Opening": "Aqua Line   Bus Terminal" 37 | }, 38 | { 39 | "English": "6", 40 | "Hindi": "Noida Sector 34", 41 | "Phase": "नोएडा सेक्टर 34", 42 | "Opening": "Feeder Bus" 43 | }, 44 | { 45 | "10": "None", 46 | "English": "7", 47 | "Hindi": "Noida City Centre", 48 | "Phase": "नोएडा सिटी सेंटर", 49 | "Opening": "2", 50 | "Interchange\nConnection": "12 November 2009", 51 | "Station Layout": "Feeder Bus", 52 | "Platform Level Type": "Elevated", 53 | "Depot Connection": "Side", 54 | "Depot Layout": "None" 55 | }, 56 | { 57 | "English": "8", 58 | "Hindi": "Golf Course", 59 | "Phase": "गोल्फ कोर्स" 60 | }, 61 | { 62 | "English": "9", 63 | "Hindi": "Botanical Garden", 64 | "Phase": "बॉटानिकल गार्डन", 65 | "Opening": "Magenta Line   Feeder Bus" 66 | }, 67 | { 68 | "English": "10", 69 | "Hindi": "Noida Sector 18", 70 | "Phase": "नोएडा सेक्टर १८", 71 | "Opening": "Feeder Bus" 72 | }, 73 | { 74 | "English": "11", 75 | "Hindi": "Noida Sector 16", 76 | "Phase": "नोएडा सेक्टर १६" 77 | }, 78 | { 79 | "English": "12", 80 | "Hindi": "Noida Sector 15", 81 | "Phase": "नोएडा सेक्टर १५" 82 | }, 83 | { 84 | "English": "13", 85 | "Hindi": "New Ashok Nagar", 86 | "Phase": "नया अशोक नगर" 87 | }, 88 | { 89 | "English": "14", 90 | "Hindi": "Mayur Vihar Extension", 91 | "Phase": "मयूर विहार विस्तार", 92 | "Opening": "Island" 93 | }, 94 | { 95 | "English": "15", 96 | "Hindi": "Mayur Vihar – I", 97 | "Phase": "मयूर विहार-१", 98 | "Opening": "Pink Line" 99 | }, 100 | { 101 | "English": "16", 102 | "Hindi": "Akshardham", 103 | "Phase": "अक्षरधाम", 104 | "Opening": "Feeder Bus", 105 | "Interchange\nConnection": "Side" 106 | }, 107 | { 108 | "English": "17", 109 | "Hindi": "Yamuna Bank", 110 | "Phase": "यमुना बैंक", 111 | "Opening": "10 May 2009", 112 | "Interchange\nConnection": "Feeder Bus", 113 | "Station Layout": "At Grade", 114 | "Platform Level Type": "Side", 115 | "Depot Connection": "Yamuna Bank Depot", 116 | "Depot Layout": "At Grade" 117 | }, 118 | { 119 | "10": "None", 120 | "English": "18", 121 | "Hindi": "Indraprastha", 122 | "Phase": "इंद्रप्रस्थ", 123 | "Opening": "1", 124 | "Interchange\nConnection": "11 November 2006", 125 | "Station Layout": "Bus Terminal", 126 | "Platform Level Type": "Elevated", 127 | "Depot Connection": "Side", 128 | "Depot Layout": "None" 129 | }, 130 | { 131 | "English": "19", 132 | "Hindi": "Pragati Maidan", 133 | "Phase": "प्रगति मैदान", 134 | "Opening": "Indian Railways   Feeder Bus" 135 | }, 136 | { 137 | "English": "20", 138 | "Hindi": "Mandi House", 139 | "Phase": "मंडी हाउस", 140 | "Opening": "Violet Line   Feeder Bus", 141 | "Interchange\nConnection": "Underground" 142 | }, 143 | { 144 | "English": "21", 145 | "Hindi": "Barakhambha Road", 146 | "Phase": "बाराखम्भा मार्ग", 147 | "Opening": "31 December 2005", 148 | "Interchange\nConnection": "Indian Railways   Feeder Bus" 149 | }, 150 | { 151 | "English": "22", 152 | "Hindi": "Rajiv Chowk", 153 | "Phase": "राजीव चौक", 154 | "Opening": "Yellow Line   Bus Terminal" 155 | }, 156 | { 157 | "English": "23", 158 | "Hindi": "Ramakrishna Ashram Marg", 159 | "Phase": "रामकृष्ण आश्रम मार्ग", 160 | "Opening": "Feeder Bus", 161 | "Interchange\nConnection": "Elevated", 162 | "Station Layout": "Side", 163 | "Platform Level Type": "None", 164 | "Depot Connection": "None" 165 | }, 166 | { 167 | "English": "24", 168 | "Hindi": "Jhandewalan", 169 | "Phase": "झंडेवालान" 170 | }, 171 | { 172 | "English": "25", 173 | "Hindi": "Karol Bagh", 174 | "Phase": "क़रोल बाग़" 175 | }, 176 | { 177 | "English": "26", 178 | "Hindi": "Rajendra Place", 179 | "Phase": "राजेंद्र प्लेस" 180 | }, 181 | { 182 | "English": "27", 183 | "Hindi": "Patel Nagar", 184 | "Phase": "पटेल नगर" 185 | }, 186 | { 187 | "English": "28", 188 | "Hindi": "Shadipur", 189 | "Phase": "शादीपुर" 190 | }, 191 | { 192 | "English": "29", 193 | "Hindi": "Kirti Nagar", 194 | "Phase": "कीर्ति नगर", 195 | "Opening": "Green Line   Feeder Bus" 196 | }, 197 | { 198 | "English": "30", 199 | "Hindi": "Moti Nagar", 200 | "Phase": "मोती नगर", 201 | "Opening": "Feeder Bus" 202 | }, 203 | { 204 | "English": "31", 205 | "Hindi": "Ramesh Nagar", 206 | "Phase": "रमेश नगर" 207 | }, 208 | { 209 | "English": "32", 210 | "Hindi": "Rajouri Garden", 211 | "Phase": "राजौरी गार्डन", 212 | "Opening": "Pink Line" 213 | }, 214 | { 215 | "English": "33", 216 | "Hindi": "Tagore Garden", 217 | "Phase": "टैगोर गार्डन", 218 | "Opening": "Feeder Bus" 219 | }, 220 | { 221 | "English": "34", 222 | "Hindi": "Subhash Nagar", 223 | "Phase": "सुभाष नगर" 224 | }, 225 | { 226 | "English": "35", 227 | "Hindi": "Tilak Nagar", 228 | "Phase": "तिलक नगर" 229 | }, 230 | { 231 | "English": "36", 232 | "Hindi": "Janakpuri East", 233 | "Phase": "जनकपुरी पूर्व" 234 | }, 235 | { 236 | "English": "37", 237 | "Hindi": "Janakpuri West", 238 | "Phase": "जनकपुरी पश्चिम", 239 | "Opening": "Magenta Line   Feeder Bus" 240 | }, 241 | { 242 | "English": "38", 243 | "Hindi": "Uttam Nagar East", 244 | "Phase": "उत्तम नगर पूर्व", 245 | "Opening": "Bus Terminal" 246 | }, 247 | { 248 | "English": "39", 249 | "Hindi": "Uttam Nagar West", 250 | "Phase": "उत्तम नगर पश्चिम", 251 | "Opening": "Feeder Bus" 252 | }, 253 | { 254 | "English": "40", 255 | "Hindi": "Nawada", 256 | "Phase": "नवादा" 257 | }, 258 | { 259 | "English": "41", 260 | "Hindi": "Dwarka Mor", 261 | "Phase": "द्वारका मोड़", 262 | "Opening": "Bus Terminal" 263 | }, 264 | { 265 | "English": "42", 266 | "Hindi": "Dwarka", 267 | "Phase": "द्वारका", 268 | "Opening": "Feeder Bus", 269 | "Interchange\nConnection": "Elevated", 270 | "Station Layout": "Side", 271 | "Platform Level Type": "Dwarka - Najafgarh\nDepot", 272 | "Depot Connection": "At Grade" 273 | }, 274 | { 275 | "10": "None", 276 | "English": "43", 277 | "Hindi": "Dwarka Sector 14", 278 | "Phase": "द्वारका सैक्टर १४", 279 | "Opening": "2", 280 | "Interchange\nConnection": "1 April 2006", 281 | "Station Layout": "", 282 | "Platform Level Type": "Elevated", 283 | "Depot Connection": "Side", 284 | "Depot Layout": "None" 285 | }, 286 | { 287 | "English": "44", 288 | "Hindi": "Dwarka Sector 13", 289 | "Phase": "द्वारका सैक्टर १३", 290 | "Opening": "" 291 | }, 292 | { 293 | "English": "45", 294 | "Hindi": "Dwarka Sector 12", 295 | "Phase": "द्वारका सैक्टर १२", 296 | "Opening": "" 297 | }, 298 | { 299 | "English": "46", 300 | "Hindi": "Dwarka Sector 11", 301 | "Phase": "द्वारका सैक्टर ११", 302 | "Opening": "" 303 | }, 304 | { 305 | "English": "47", 306 | "Hindi": "Dwarka Sector 10", 307 | "Phase": "द्वारका सैक्टर १०", 308 | "Opening": "" 309 | }, 310 | { 311 | "English": "48", 312 | "Hindi": "Dwarka Sector 9", 313 | "Phase": "द्वारका सैक्टर ९", 314 | "Opening": "" 315 | }, 316 | { 317 | "English": "49", 318 | "Hindi": "Dwarka Sector 8", 319 | "Phase": "द्वारका सैक्टर ८", 320 | "Opening": "30 October 2010", 321 | "Interchange\nConnection": "Indian Railways   Bus Terminal" 322 | }, 323 | { 324 | "English": "50", 325 | "Hindi": "Dwarka Sector 21", 326 | "Phase": "द्वारका सैक्टर २१", 327 | "Opening": "Orange Line \n Feeder Bus", 328 | "Interchange\nConnection": "Underground" 329 | } 330 | ] -------------------------------------------------------------------------------- /functions/functions/lines/bluebranch.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "10": "At Grade", 4 | "English": "1", 5 | "Hindi": "Yamuna Bank", 6 | "Phase": "यमुना बैंक", 7 | "Opening": "2", 8 | "Interchange\nConnection": "10 May 2009", 9 | "Station Layout": "Feeder Bus", 10 | "Platform Level Type": "At Grade", 11 | "Depot Connection": "Island", 12 | "Depot Layout": "Yamuna Bank Depot" 13 | }, 14 | { 15 | "English": "2", 16 | "Hindi": "Laxmi Nagar", 17 | "Phase": "लक्ष्मी नगर", 18 | "Opening": "6 January 2010[7]", 19 | "Interchange\nConnection": "Feeder Bus", 20 | "Station Layout": "Elevated", 21 | "Platform Level Type": "Side", 22 | "Depot Connection": "None", 23 | "Depot Layout": "None" 24 | }, 25 | { 26 | "English": "3", 27 | "Hindi": "Nirman Vihar", 28 | "Phase": "निर्माण विहार" 29 | }, 30 | { 31 | "English": "4", 32 | "Hindi": "Preet Vihar", 33 | "Phase": "प्रीत विहार" 34 | }, 35 | { 36 | "English": "5", 37 | "Hindi": "Karkarduma", 38 | "Phase": "कड़कड़ डूमा", 39 | "Opening": "Pink Line" 40 | }, 41 | { 42 | "English": "6", 43 | "Hindi": "Anand Vihar", 44 | "Phase": "आनंद विहार", 45 | "Opening": "Pink Line   Indian Railways   ISBT" 46 | }, 47 | { 48 | "English": "7", 49 | "Hindi": "Kaushambi", 50 | "Phase": "कौशाम्बी", 51 | "Opening": "14 July 2011[8]", 52 | "Interchange\nConnection": "Bus Terminal" 53 | }, 54 | { 55 | "English": "8", 56 | "Hindi": "Vaishali", 57 | "Phase": "वैशाली", 58 | "Opening": "Feeder Bus" 59 | } 60 | ] -------------------------------------------------------------------------------- /functions/functions/lines/green.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "8": "None", 4 | "English": "1", 5 | "Hindi": "Inderlok", 6 | "Opening": "इंद्रलोक", 7 | "Interchange\nConnection": "3 April 2010[4]", 8 | "Station Layout": "Red Line \n Feeder Bus", 9 | "Depot Connection": "Elevated", 10 | "Depot Layout": "None" 11 | }, 12 | { 13 | "8": "None", 14 | "English": "2", 15 | "Hindi": "Ashok Park Main", 16 | "Opening": "अशोक पार्क मेन", 17 | "Interchange\nConnection": "3 April 2010[4]", 18 | "Station Layout": "Feeder Bus", 19 | "Depot Connection": "Elevated", 20 | "Depot Layout": "None" 21 | }, 22 | { 23 | "8": "None", 24 | "English": "3", 25 | "Hindi": "Punjabi Bagh", 26 | "Opening": "पंजाबी बाग़", 27 | "Interchange\nConnection": "3 April 2010[4]", 28 | "Station Layout": "Bus Terminal", 29 | "Depot Connection": "Elevated", 30 | "Depot Layout": "None" 31 | }, 32 | { 33 | "8": "None", 34 | "English": "4", 35 | "Hindi": "Shivaji Park", 36 | "Opening": "शिवाजी पार्क", 37 | "Interchange\nConnection": "3 April 2010[4]", 38 | "Station Layout": "Feeder Bus", 39 | "Depot Connection": "Elevated", 40 | "Depot Layout": "None" 41 | }, 42 | { 43 | "8": "None", 44 | "English": "5", 45 | "Hindi": "Madipur", 46 | "Opening": "मादीपुर", 47 | "Interchange\nConnection": "3 April 2010[4]", 48 | "Station Layout": "Feeder Bus", 49 | "Depot Connection": "Elevated", 50 | "Depot Layout": "None" 51 | }, 52 | { 53 | "8": "None", 54 | "English": "6", 55 | "Hindi": "Paschim Vihar East", 56 | "Opening": "पश्चिम विहार पूर्व", 57 | "Interchange\nConnection": "3 April 2010[4]", 58 | "Station Layout": "Feeder Bus", 59 | "Depot Connection": "Elevated", 60 | "Depot Layout": "None" 61 | }, 62 | { 63 | "8": "None", 64 | "English": "7", 65 | "Hindi": "Paschim Vihar West", 66 | "Opening": "पश्चिम विहार पश्चिम", 67 | "Interchange\nConnection": "3 April 2010[4]", 68 | "Station Layout": "Feeder Bus", 69 | "Depot Connection": "Elevated", 70 | "Depot Layout": "None" 71 | }, 72 | { 73 | "8": "None", 74 | "English": "8", 75 | "Hindi": "Peera Garhi", 76 | "Opening": "पीरागढ़ी", 77 | "Interchange\nConnection": "3 April 2010[4]", 78 | "Station Layout": "Feeder Bus", 79 | "Depot Connection": "", 80 | "Depot Layout": "None" 81 | }, 82 | { 83 | "8": "None", 84 | "English": "9", 85 | "Hindi": "Udyog Nagar", 86 | "Opening": "उद्योग नगर", 87 | "Interchange\nConnection": "3 April 2010[4]", 88 | "Station Layout": "Feeder Bus", 89 | "Depot Connection": "Elevated", 90 | "Depot Layout": "None" 91 | }, 92 | { 93 | "8": "None", 94 | "English": "10", 95 | "Hindi": "Surajmal Stadium", 96 | "Opening": "सूरजमल स्टेडियम", 97 | "Interchange\nConnection": "3 April 2010[4]", 98 | "Station Layout": "Feeder Bus", 99 | "Depot Connection": "Elevated", 100 | "Depot Layout": "None" 101 | }, 102 | { 103 | "8": "None", 104 | "English": "11", 105 | "Hindi": "Nangloi", 106 | "Opening": "नांगलोई", 107 | "Interchange\nConnection": "3 April 2010[4]", 108 | "Station Layout": "Bus Terminal", 109 | "Depot Connection": "Elevated", 110 | "Depot Layout": "None" 111 | }, 112 | { 113 | "8": "None", 114 | "English": "12", 115 | "Hindi": "Nangloi Railway station", 116 | "Opening": "नांगलोई रेलवे स्टेशन", 117 | "Interchange\nConnection": "3 April 2010[4]", 118 | "Station Layout": "Indian Railways \n Feeder Bus", 119 | "Depot Connection": "Elevated", 120 | "Depot Layout": "None" 121 | }, 122 | { 123 | "8": "None", 124 | "English": "13", 125 | "Hindi": "Rajdhani Park", 126 | "Opening": "राजधानी पार्क", 127 | "Interchange\nConnection": "3 April 2010[4]", 128 | "Station Layout": "Feeder Bus", 129 | "Depot Connection": "Elevated", 130 | "Depot Layout": "None" 131 | }, 132 | { 133 | "8": "At Grade", 134 | "English": "14", 135 | "Hindi": "Mundka", 136 | "Opening": "मुण्डका", 137 | "Interchange\nConnection": "3 April 2010[4]", 138 | "Station Layout": "Indian Railways \n Bus Terminal", 139 | "Depot Connection": "Elevated", 140 | "Depot Layout": "Mundka Depot" 141 | }, 142 | { 143 | "8": "None", 144 | "English": "15", 145 | "Hindi": "Mundka Industrial Area", 146 | "Opening": "मुण्डका औद्योगिक क्षेत्र", 147 | "Interchange\nConnection": "24 June 2018", 148 | "Station Layout": "Feeder Bus", 149 | "Depot Connection": "Elevated", 150 | "Depot Layout": "None" 151 | }, 152 | { 153 | "8": "None", 154 | "English": "16", 155 | "Hindi": "Ghevra Metro station", 156 | "Opening": "घेवरा मेट्रो स्टेशन", 157 | "Interchange\nConnection": "24 June 2018", 158 | "Station Layout": "Indian Railways", 159 | "Depot Connection": "Elevated", 160 | "Depot Layout": "None" 161 | }, 162 | { 163 | "8": "None", 164 | "English": "17", 165 | "Hindi": "Tikri Kalan", 166 | "Opening": "टीकरी कलाँ", 167 | "Interchange\nConnection": "24 June 2018", 168 | "Station Layout": "Feeder Bus", 169 | "Depot Connection": "Elevated", 170 | "Depot Layout": "None" 171 | }, 172 | { 173 | "8": "None", 174 | "English": "18", 175 | "Hindi": "Tikri Border", 176 | "Opening": "टीकरी बॉर्डर", 177 | "Interchange\nConnection": "24 June 2018", 178 | "Station Layout": "Bus Terminal", 179 | "Depot Connection": "Elevated", 180 | "Depot Layout": "None" 181 | }, 182 | { 183 | "8": "At Grade", 184 | "English": "19", 185 | "Hindi": "Pandit Shree Ram Sharma", 186 | "Opening": "पंडित श्री राम शर्मा", 187 | "Interchange\nConnection": "24 June 2018", 188 | "Station Layout": "Bus Terminal", 189 | "Depot Connection": "Elevated", 190 | "Depot Layout": "Modern Industrial Estate (MIE)\nDepot" 191 | }, 192 | { 193 | "8": "None", 194 | "English": "20", 195 | "Hindi": "Bahadurgarh City", 196 | "Opening": "बहादुरगढ़ सिटी", 197 | "Interchange\nConnection": "24 June 2018", 198 | "Station Layout": "Bus Terminal", 199 | "Depot Connection": "Elevated", 200 | "Depot Layout": "None" 201 | }, 202 | { 203 | "8": "None", 204 | "English": "21", 205 | "Hindi": "Brigadier Hoshiyar Singh", 206 | "Opening": "ब्रिगेडियर होशियार सिंह", 207 | "Interchange\nConnection": "24 June 2018", 208 | "Station Layout": "Indian Railways", 209 | "Depot Connection": "Elevated", 210 | "Depot Layout": "None" 211 | } 212 | ] -------------------------------------------------------------------------------- /functions/functions/lines/greenbranch.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "8": "None", 4 | "English": "1", 5 | "Hindi": "Ashok Park Main", 6 | "Opening": "अशोक पार्क मेन", 7 | "Interchange\nConnection": "3 April 2010", 8 | "Station Layout": "Feeder Bus", 9 | "Depot Connection": "Elevated", 10 | "Depot Layout": "None" 11 | }, 12 | { 13 | "8": "None", 14 | "English": "2", 15 | "Hindi": "Satguru Ram Singh Marg", 16 | "Opening": "सतगुरु राम सिंह मार्ग", 17 | "Interchange\nConnection": "27 August 2011", 18 | "Station Layout": "Indian Railways \n Feeder Bus", 19 | "Depot Connection": "Elevated", 20 | "Depot Layout": "None" 21 | }, 22 | { 23 | "8": "None", 24 | "English": "3", 25 | "Hindi": "Kirti Nagar", 26 | "Opening": "कीर्ति नगर", 27 | "Interchange\nConnection": "27 August 2011", 28 | "Station Layout": "Blue Line \n Bus Terminal", 29 | "Depot Connection": "At Grade", 30 | "Depot Layout": "None" 31 | } 32 | ] -------------------------------------------------------------------------------- /functions/functions/lines/grey.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "1": "2", 4 | "2": "Najafgarh", 5 | "3": "नजफगढ़", 6 | "4": "3", 7 | "5": "4 October 2019", 8 | "6": "Feeder Bus", 9 | "7": "Underground", 10 | "8": "Island", 11 | "9": "Dwarka - Najafgarh\nDepot", 12 | "10": "At Grade" 13 | }, 14 | { 15 | "1": "3", 16 | "2": "Nangli", 17 | "3": "नंगली", 18 | "4": "3", 19 | "5": "4 October 2019", 20 | "6": "Feeder Bus", 21 | "7": "Elevated", 22 | "8": "Side", 23 | "9": "None", 24 | "10": "None" 25 | }, 26 | { 27 | "1": "4", 28 | "2": "Dwarka", 29 | "3": "द्वारका", 30 | "4": "3", 31 | "5": "4 October 2019", 32 | "6": "Blue Line \n Feeder Bus", 33 | "7": "Elevated", 34 | "8": "Side", 35 | "9": "Dwarka - Najafgarh\nDepot", 36 | "10": "At Grade" 37 | } 38 | ] -------------------------------------------------------------------------------- /functions/functions/lines/magenta.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "25": "Janakpuri West", 4 | "Hindi": "जनकपुरी पश्चिम", 5 | "Phase": "3", 6 | "Opening": "29 May 2018", 7 | "Interchange\nConnection": "Blue Line   Bus Terminal", 8 | "Station Layout": "Underground", 9 | "Platform Level Type": "Island", 10 | "Depot Connection": "None", 11 | "Depot Layout": "None" 12 | }, 13 | { 14 | "25": "Dabri Mor-Janakpuri South", 15 | "Hindi": "डाबरी मोर", 16 | "Phase": "Feeder Bus" 17 | }, 18 | { 19 | "25": "Dashrath Puri", 20 | "Hindi": "दशरथ पुरी" 21 | }, 22 | { 23 | "25": "Palam", 24 | "Hindi": "पालम", 25 | "Phase": "Bus Terminal" 26 | }, 27 | { 28 | "25": "Sadar Bazaar Cantonment", 29 | "Hindi": "सदर बाजार छावनी", 30 | "Phase": "Feeder Bus", 31 | "Opening": "Elevated", 32 | "Interchange\nConnection": "Side" 33 | }, 34 | { 35 | "25": "Terminal 1-IGI Airport", 36 | "Hindi": "टर्मिनल 1 इन्दिरा गाँधी अंतर्राष्ट्रीय हवाई अड्डा", 37 | "Phase": "IGI Airport   Feeder Bus", 38 | "Opening": "Underground", 39 | "Interchange\nConnection": "Island" 40 | }, 41 | { 42 | "25": "Shankar Vihar", 43 | "Hindi": "शंकर विहार", 44 | "Phase": "Feeder Bus", 45 | "Opening": "Elevated", 46 | "Interchange\nConnection": "Side" 47 | }, 48 | { 49 | "25": "Vasant Vihar", 50 | "Hindi": "वसन्त विहार", 51 | "Phase": "Underground", 52 | "Opening": "Island" 53 | }, 54 | { 55 | "25": "Munirka", 56 | "Hindi": "मुनिरका" 57 | }, 58 | { 59 | "25": "R.K.Puram", 60 | "Hindi": "राम कृष्ण पुरम" 61 | }, 62 | { 63 | "25": "IIT Delhi", 64 | "Hindi": "आईआईटी दिल्ली" 65 | }, 66 | { 67 | "25": "Hauz Khas", 68 | "Hindi": "हौज़ खास", 69 | "Phase": "Yellow Line   Feeder Bus" 70 | }, 71 | { 72 | "25": "Panchsheel Park", 73 | "Hindi": "पंचशील पार्क", 74 | "Phase": "Feeder Bus" 75 | }, 76 | { 77 | "25": "Chirag Delhi", 78 | "Hindi": "चिराग दिल्ली" 79 | }, 80 | { 81 | "25": "Greater Kailash", 82 | "Hindi": "ग्रेटर कैलाश" 83 | }, 84 | { 85 | "25": "Nehru Enclave", 86 | "Hindi": "नेहरू एन्क्लेव" 87 | }, 88 | { 89 | "25": "Kalkaji Mandir", 90 | "Hindi": "कालकाजी मंदिर", 91 | "Phase": "25 Dec 2017", 92 | "Opening": "Violet Line   Bus Terminal", 93 | "Interchange\nConnection": "Side" 94 | }, 95 | { 96 | "25": "Okhla NSIC", 97 | "Hindi": "ओखला एन एस आई सी", 98 | "Phase": "Indian Railways   Feeder Bus", 99 | "Opening": "Elevated", 100 | "Interchange\nConnection": "Side" 101 | }, 102 | { 103 | "25": "Sukhdev Vihar", 104 | "Hindi": "सुखदेव विहार", 105 | "Phase": "Feeder Bus" 106 | }, 107 | { 108 | "25": "Jamia Millia Islamia", 109 | "Hindi": "जामिया मिलिया इस्लामिया" 110 | }, 111 | { 112 | "25": "Okhla Vihar", 113 | "Hindi": "ओखला विहार" 114 | }, 115 | { 116 | "25": "Jasola Vihar Shaheen Bagh", 117 | "Hindi": "जसोला विहार शाहीन बाग", 118 | "Phase": "Elevated", 119 | "Opening": "Side", 120 | "Interchange\nConnection": "Jasola Vihar Shaheen Bagh Depot", 121 | "Station Layout": "Elevated" 122 | }, 123 | { 124 | "25": "Kalindi Kunj", 125 | "Hindi": "कालिन्दी कुंज", 126 | "Phase": "Bus Terminal", 127 | "Opening": "Elevated", 128 | "Interchange\nConnection": "Side", 129 | "Station Layout": "Kalindi Kunj\nDepot", 130 | "Platform Level Type": "At Grade" 131 | }, 132 | { 133 | "25": "Okhla Bird Sanctuary", 134 | "Hindi": "ओखला पक्षी अभयारण्य", 135 | "Phase": "Feeder Bus", 136 | "Opening": "Elevated", 137 | "Interchange\nConnection": "Side", 138 | "Station Layout": "None", 139 | "Platform Level Type": "None" 140 | }, 141 | { 142 | "25": "Botanical Garden", 143 | "Hindi": "बॉटैनिकल गार्डन", 144 | "Phase": "Blue Line   Feeder Bus" 145 | } 146 | ] -------------------------------------------------------------------------------- /functions/functions/lines/orange.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "8": "None", 4 | "English": "1", 5 | "Hindi": "New Delhi", 6 | "Opening": "नई दिल्ली", 7 | "Interchange\nConnection": "23 February 2011", 8 | "Station Layout": "Yellow Line \n Indian Railways   Bus Terminal", 9 | "Depot Connection": "Underground", 10 | "Depot Layout": "None" 11 | }, 12 | { 13 | "8": "None", 14 | "English": "2", 15 | "Hindi": "Shivaji Stadium", 16 | "Opening": "शिवाजी स्टेडियम", 17 | "Interchange\nConnection": "23 February 2011", 18 | "Station Layout": "Bus Terminal", 19 | "Depot Connection": "Underground", 20 | "Depot Layout": "None" 21 | }, 22 | { 23 | "8": "None", 24 | "English": "3", 25 | "Hindi": "Dhaula Kuan", 26 | "Opening": "धौला कुआँ", 27 | "Interchange\nConnection": "15 August 2011", 28 | "Station Layout": "Pink Line   Feeder Bus", 29 | "Depot Connection": "Elevated", 30 | "Depot Layout": "None" 31 | }, 32 | { 33 | "8": "None", 34 | "English": "4", 35 | "Hindi": "Delhi Aerocity", 36 | "Opening": "दिल्ली एरोसिटी", 37 | "Interchange\nConnection": "15 August 2011", 38 | "Station Layout": "IGI Airport   Feeder Bus", 39 | "Depot Connection": "Underground", 40 | "Depot Layout": "None" 41 | }, 42 | { 43 | "8": "None", 44 | "English": "5", 45 | "Hindi": "Airport", 46 | "Opening": "विमानपत्तन", 47 | "Interchange\nConnection": "23 February 2011", 48 | "Station Layout": "IGI Airport   Feeder Bus", 49 | "Depot Connection": "Underground", 50 | "Depot Layout": "None" 51 | }, 52 | { 53 | "8": "At Grade", 54 | "English": "6", 55 | "Hindi": "Dwarka Sector 21", 56 | "Opening": "द्वारका सेक्टर २१", 57 | "Interchange\nConnection": "23 February 2011", 58 | "Station Layout": "Blue Line  Feeder Bus", 59 | "Depot Connection": "Underground", 60 | "Depot Layout": "Dwarka Sector 21 Depot" 61 | } 62 | ] -------------------------------------------------------------------------------- /functions/functions/lines/pink.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "3": "मजलिस पार्क", 4 | "4": "3", 5 | "10": "At Grade", 6 | "English": "8", 7 | "Hindi": "Majlis Park", 8 | "Interchange\nConnection": "14 March 2018", 9 | "Station Layout": "Feeder Bus", 10 | "Platform Level Type": "Elevated", 11 | "Depot Connection": "Side", 12 | "Depot Layout": "Mukundpur Depot" 13 | }, 14 | { 15 | "3": "आजादपुर", 16 | "4": "3", 17 | "10": "None", 18 | "English": "9", 19 | "Hindi": "Azadpur", 20 | "Interchange\nConnection": "14 March 2018", 21 | "Station Layout": "Yellow Line \n Bus Terminal", 22 | "Platform Level Type": "Underground", 23 | "Depot Connection": "Island", 24 | "Depot Layout": "None" 25 | }, 26 | { 27 | "3": "शालीमार बाग", 28 | "4": "3", 29 | "10": "None", 30 | "English": "10", 31 | "Hindi": "Shalimar Bagh", 32 | "Interchange\nConnection": "14 March 2018", 33 | "Station Layout": "Feeder Bus", 34 | "Platform Level Type": "Underground", 35 | "Depot Connection": "Island", 36 | "Depot Layout": "None" 37 | }, 38 | { 39 | "3": "नेताजी सुभाष प्लेस", 40 | "4": "3", 41 | "10": "None", 42 | "English": "11", 43 | "Hindi": "Netaji Subhash Place", 44 | "Interchange\nConnection": "14 March 2018", 45 | "Station Layout": "Red Line \n Feeder Bus", 46 | "Platform Level Type": "Underground", 47 | "Depot Connection": "Side", 48 | "Depot Layout": "None" 49 | }, 50 | { 51 | "3": "शकूरपुर", 52 | "4": "3", 53 | "10": "None", 54 | "English": "12", 55 | "Hindi": "Shakurpur", 56 | "Interchange\nConnection": "14 March 2018", 57 | "Station Layout": "Feeder Bus", 58 | "Platform Level Type": "Elevated", 59 | "Depot Connection": "Island", 60 | "Depot Layout": "None" 61 | }, 62 | { 63 | "3": "पंजाबी बाग पश्चिम", 64 | "4": "3", 65 | "10": "None", 66 | "English": "13", 67 | "Hindi": "Punjabi Bagh West", 68 | "Interchange\nConnection": "14 March 2018", 69 | "Station Layout": "Green Line  (via out-of-system transfer)\n Feeder Bus", 70 | "Platform Level Type": "Elevated", 71 | "Depot Connection": "Side", 72 | "Depot Layout": "None" 73 | }, 74 | { 75 | "3": "ईएसआई अस्पताल", 76 | "4": "3", 77 | "10": "None", 78 | "English": "14", 79 | "Hindi": "ESI Hospital", 80 | "Interchange\nConnection": "14 March 2018", 81 | "Station Layout": "Feeder Bus", 82 | "Platform Level Type": "Elevated", 83 | "Depot Connection": "Side", 84 | "Depot Layout": "None" 85 | }, 86 | { 87 | "3": "राजौरी गार्डन", 88 | "4": "3", 89 | "10": "None", 90 | "English": "15", 91 | "Hindi": "Rajouri Garden", 92 | "Interchange\nConnection": "14 March 2018", 93 | "Station Layout": "Blue Line \n Feeder Bus", 94 | "Platform Level Type": "Elevated", 95 | "Depot Connection": "Side", 96 | "Depot Layout": "None" 97 | }, 98 | { 99 | "3": "माया पुरी", 100 | "4": "3", 101 | "10": "None", 102 | "English": "16", 103 | "Hindi": "Mayapuri", 104 | "Interchange\nConnection": "14 March 2018", 105 | "Station Layout": "Feeder Bus", 106 | "Platform Level Type": "Elevated", 107 | "Depot Connection": "Side", 108 | "Depot Layout": "None" 109 | }, 110 | { 111 | "3": "नारायणा विहार", 112 | "4": "3", 113 | "10": "None", 114 | "English": "17", 115 | "Hindi": "Naraina Vihar", 116 | "Interchange\nConnection": "14 March 2018", 117 | "Station Layout": "Feeder Bus", 118 | "Platform Level Type": "Underground", 119 | "Depot Connection": "Island", 120 | "Depot Layout": "None" 121 | }, 122 | { 123 | "3": "दिल्ली छावनी", 124 | "4": "3", 125 | "10": "None", 126 | "English": "18", 127 | "Hindi": "Delhi Cantonment", 128 | "Interchange\nConnection": "14 March 2018", 129 | "Station Layout": "Indian Railways", 130 | "Platform Level Type": "Elevated", 131 | "Depot Connection": "Side", 132 | "Depot Layout": "None" 133 | }, 134 | { 135 | "3": "दुर्गाबाई देशमुख साउथ कैम्पस", 136 | "4": "3", 137 | "10": "None", 138 | "English": "19", 139 | "Hindi": "Durgabai Deshmukh South Campus", 140 | "Interchange\nConnection": "14 March 2018", 141 | "Station Layout": "Orange Line \n Feeder Bus", 142 | "Platform Level Type": "Elevated", 143 | "Depot Connection": "Side", 144 | "Depot Layout": "None" 145 | }, 146 | { 147 | "3": "सर विश्वेश्वरय्या मोती बाग", 148 | "4": "3", 149 | "10": "None", 150 | "English": "20", 151 | "Hindi": "Sir Vishweshwaraiah Moti Bagh", 152 | "Interchange\nConnection": "6 August 2018", 153 | "Station Layout": "Feeder Bus", 154 | "Platform Level Type": "Elevated", 155 | "Depot Connection": "Side", 156 | "Depot Layout": "None" 157 | }, 158 | { 159 | "3": "भीकाजी कामा प्लेस", 160 | "4": "3", 161 | "10": "None", 162 | "English": "21", 163 | "Hindi": "Bhikaji Cama Place", 164 | "Interchange\nConnection": "6 August 2018", 165 | "Station Layout": "Feeder Bus", 166 | "Platform Level Type": "Underground", 167 | "Depot Connection": "Island", 168 | "Depot Layout": "None" 169 | }, 170 | { 171 | "3": "सरोजिनी नगर", 172 | "4": "3", 173 | "10": "None", 174 | "English": "22", 175 | "Hindi": "Sarojini Nagar", 176 | "Interchange\nConnection": "6 August 2018", 177 | "Station Layout": "Feeder Bus", 178 | "Platform Level Type": "Underground", 179 | "Depot Connection": "Island", 180 | "Depot Layout": "None" 181 | }, 182 | { 183 | "3": "आई एन ए", 184 | "4": "3", 185 | "10": "None", 186 | "English": "23", 187 | "Hindi": "INA", 188 | "Interchange\nConnection": "6 August 2018", 189 | "Station Layout": "Yellow Line \n Feeder Bus", 190 | "Platform Level Type": "Underground", 191 | "Depot Connection": "Island", 192 | "Depot Layout": "None" 193 | }, 194 | { 195 | "3": "साउथ एक्सटेंशन", 196 | "4": "3", 197 | "10": "None", 198 | "English": "24", 199 | "Hindi": "South Extension", 200 | "Interchange\nConnection": "6 August 2018", 201 | "Station Layout": "Feeder Bus", 202 | "Platform Level Type": "Underground", 203 | "Depot Connection": "Island", 204 | "Depot Layout": "None" 205 | }, 206 | { 207 | "3": "लाजपत नगर", 208 | "4": "3", 209 | "10": "None", 210 | "English": "25", 211 | "Hindi": "Lajpat Nagar", 212 | "Interchange\nConnection": "6 August 2018", 213 | "Station Layout": "Violet Line \n Bus Terminal", 214 | "Platform Level Type": "Underground", 215 | "Depot Connection": "Island", 216 | "Depot Layout": "None" 217 | }, 218 | { 219 | "3": "विनोबापुरी", 220 | "4": "3", 221 | "10": "None", 222 | "English": "26", 223 | "Hindi": "Vinobapuri", 224 | "Interchange\nConnection": "31 December 2018", 225 | "Station Layout": "Feeder Bus", 226 | "Platform Level Type": "Underground", 227 | "Depot Connection": "Island", 228 | "Depot Layout": "None" 229 | }, 230 | { 231 | "3": "आश्रम", 232 | "4": "3", 233 | "10": "None", 234 | "English": "27", 235 | "Hindi": "Ashram", 236 | "Interchange\nConnection": "31 December 2018", 237 | "Station Layout": "Feeder Bus", 238 | "Platform Level Type": "Underground", 239 | "Depot Connection": "Island", 240 | "Depot Layout": "None" 241 | }, 242 | { 243 | "3": "सराय काले खान - निजामुद्दीन", 244 | "4": "3", 245 | "10": "None", 246 | "English": "28", 247 | "Hindi": "Hazrat Nizamuddin", 248 | "Interchange\nConnection": "31 December 2018", 249 | "Station Layout": "Indian Railways   ISBT", 250 | "Platform Level Type": "Underground", 251 | "Depot Connection": "Island", 252 | "Depot Layout": "None" 253 | }, 254 | { 255 | "3": "मयूर विहार-१", 256 | "4": "3", 257 | "10": "None", 258 | "English": "29", 259 | "Hindi": "Mayur Vihar - I", 260 | "Interchange\nConnection": "31 December 2018", 261 | "Station Layout": "Blue Line \n Feeder Bus", 262 | "Platform Level Type": "Elevated", 263 | "Depot Connection": "Side", 264 | "Depot Layout": "None" 265 | }, 266 | { 267 | "3": "मयूर विहार पॉकेट 1", 268 | "4": "3", 269 | "10": "None", 270 | "English": "30", 271 | "Hindi": "Mayur Vihar Pocket I", 272 | "Interchange\nConnection": "31 December 2018", 273 | "Station Layout": "Feeder Bus", 274 | "Platform Level Type": "Elevated", 275 | "Depot Connection": "Side", 276 | "Depot Layout": "None" 277 | } 278 | ] -------------------------------------------------------------------------------- /functions/functions/lines/pinkbranch.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "3": "त्रिलोकपुरी संजय झील", 4 | "4": "3", 5 | "10": "None", 6 | "English": "31", 7 | "Hindi": "Trilokpuri Sanjay Lake", 8 | "Interchange\nConnection": "31 October 2018", 9 | "Station Layout": "Feeder Bus", 10 | "Platform Level Type": "Elevated", 11 | "Depot Connection": "Side", 12 | "Depot Layout": "None" 13 | }, 14 | { 15 | "3": "पूर्वी विनोद नगर - मयूर विहार - II", 16 | "4": "3", 17 | "10": "None", 18 | "English": "32", 19 | "Hindi": "East Vinod Nagar - Mayur Vihar-II", 20 | "Interchange\nConnection": "31 October 2018", 21 | "Station Layout": "Bus Terminal", 22 | "Platform Level Type": "Elevated", 23 | "Depot Connection": "Side", 24 | "Depot Layout": "None" 25 | }, 26 | { 27 | "3": "मंडावली- वेस्ट विनोद नगर", 28 | "4": "3", 29 | "10": "None", 30 | "English": "33", 31 | "Hindi": "Mandawali - West Vinod Nagar", 32 | "Interchange\nConnection": "31 October 2018", 33 | "Station Layout": "Feeder Bus", 34 | "Platform Level Type": "Elevated", 35 | "Depot Connection": "Side", 36 | "Depot Layout": "None" 37 | }, 38 | { 39 | "3": "आईपी एक्सटेंशन", 40 | "4": "3", 41 | "10": "At Grade\nElevated", 42 | "English": "34", 43 | "Hindi": "IP Extension", 44 | "Interchange\nConnection": "31 October 2018", 45 | "Station Layout": "Bus Terminal", 46 | "Platform Level Type": "Elevated", 47 | "Depot Connection": "Island", 48 | "Depot Layout": "Vinod Nagar Depot" 49 | }, 50 | { 51 | "3": "आनंद विहार", 52 | "4": "3", 53 | "10": "None", 54 | "English": "35", 55 | "Hindi": "Anand Vihar", 56 | "Interchange\nConnection": "31 October 2018", 57 | "Station Layout": "Blue Line \n Indian Railways   ISBT", 58 | "Platform Level Type": "Elevated", 59 | "Depot Connection": "Side", 60 | "Depot Layout": "None" 61 | }, 62 | { 63 | "3": "कड़कड़डूमा", 64 | "4": "3", 65 | "10": "None", 66 | "English": "36", 67 | "Hindi": "Karkarduma", 68 | "Interchange\nConnection": "31 October 2018", 69 | "Station Layout": "Blue Line \n Feeder Bus", 70 | "Platform Level Type": "Elevated", 71 | "Depot Connection": "Side", 72 | "Depot Layout": "None" 73 | }, 74 | { 75 | "3": "कड़कड़डूमा कोर्ट", 76 | "4": "3", 77 | "10": "None", 78 | "English": "37", 79 | "Hindi": "Karkarduma Court", 80 | "Interchange\nConnection": "31 October 2018", 81 | "Station Layout": "Feeder Bus", 82 | "Platform Level Type": "Elevated", 83 | "Depot Connection": "Side", 84 | "Depot Layout": "None" 85 | }, 86 | { 87 | "3": "कृष्णा नगर", 88 | "4": "3", 89 | "10": "None", 90 | "English": "38", 91 | "Hindi": "Krishna Nagar", 92 | "Interchange\nConnection": "31 October 2018", 93 | "Station Layout": "Feeder Bus", 94 | "Platform Level Type": "Elevated", 95 | "Depot Connection": "Side", 96 | "Depot Layout": "None" 97 | }, 98 | { 99 | "3": "आजाद नगर पूर्व", 100 | "4": "3", 101 | "10": "None", 102 | "English": "39", 103 | "Hindi": "East Azad Nagar", 104 | "Interchange\nConnection": "31 October 2018", 105 | "Station Layout": "Feeder Bus", 106 | "Platform Level Type": "Elevated", 107 | "Depot Connection": "Side", 108 | "Depot Layout": "None" 109 | }, 110 | { 111 | "3": "वेलकम", 112 | "4": "3", 113 | "10": "None", 114 | "English": "40", 115 | "Hindi": "Welcome", 116 | "Interchange\nConnection": "31 October 2018", 117 | "Station Layout": "Red Line \n Feeder Bus", 118 | "Platform Level Type": "Elevated", 119 | "Depot Connection": "Side", 120 | "Depot Layout": "None" 121 | }, 122 | { 123 | "3": "जाफराबाद", 124 | "4": "3", 125 | "10": "None", 126 | "English": "41", 127 | "Hindi": "Jaffrabad", 128 | "Interchange\nConnection": "31 October 2018", 129 | "Station Layout": "Feeder Bus", 130 | "Platform Level Type": "Elevated", 131 | "Depot Connection": "Side", 132 | "Depot Layout": "None" 133 | }, 134 | { 135 | "3": "मौजपुर - बाबरपुर", 136 | "4": "3", 137 | "10": "None", 138 | "English": "42", 139 | "Hindi": "Maujpur-Babarpur", 140 | "Interchange\nConnection": "31 October 2018", 141 | "Station Layout": "Feeder Bus", 142 | "Platform Level Type": "Elevated", 143 | "Depot Connection": "Island", 144 | "Depot Layout": "None" 145 | }, 146 | { 147 | "3": "गोकुलपुरी", 148 | "4": "3", 149 | "10": "None", 150 | "English": "43", 151 | "Hindi": "Gokulpuri", 152 | "Interchange\nConnection": "31 October 2018", 153 | "Station Layout": "Bus Terminal", 154 | "Platform Level Type": "Elevated", 155 | "Depot Connection": "Side", 156 | "Depot Layout": "None" 157 | }, 158 | { 159 | "3": "जौहरी एनक्लेव", 160 | "4": "3", 161 | "10": "None", 162 | "English": "44", 163 | "Hindi": "Johri Enclave", 164 | "Interchange\nConnection": "31 October 2018", 165 | "Station Layout": "Bus Terminal", 166 | "Platform Level Type": "Elevated", 167 | "Depot Connection": "Side", 168 | "Depot Layout": "None" 169 | }, 170 | { 171 | "3": "शिव विहार", 172 | "4": "3", 173 | "10": "None", 174 | "English": "45", 175 | "Hindi": "Shiv Vihar", 176 | "Interchange\nConnection": "31 October 2018", 177 | "Station Layout": "Feeder Bus", 178 | "Platform Level Type": "Elevated", 179 | "Depot Connection": "Side", 180 | "Depot Layout": "None" 181 | } 182 | ] -------------------------------------------------------------------------------- /functions/functions/lines/rapid.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "English": "2", 4 | "Hindi": "Phase 2", 5 | "Phase": "14 November 2013", 6 | "Opening": "None" 7 | }, 8 | { 9 | "English": "1", 10 | "Hindi": "Sikandarpur", 11 | "Phase": "14 November 2013", 12 | "Opening": "Delhi Metro Yellow Line" 13 | }, 14 | { 15 | "#": "1", 16 | "Hindi": "Phase 1", 17 | "Opening": "31 March 2017", 18 | "Connections": "None" 19 | }, 20 | { 21 | "#": "2", 22 | "Hindi": "Sector 42-43", 23 | "Opening": "25 April 2017", 24 | "Connections": "None" 25 | }, 26 | { 27 | "#": "3", 28 | "Hindi": "Sector 53-54", 29 | "Opening": "25 April 2017", 30 | "Connections": "None" 31 | }, 32 | { 33 | "#": "4", 34 | "Hindi": "Sector 54 Chowk", 35 | "Opening": "31 March 2017", 36 | "Connections": "None" 37 | }, 38 | { 39 | "#": "5", 40 | "Hindi": "Sector 55–56", 41 | "Opening": "31 March 2017", 42 | "Connections": "None" 43 | } 44 | ] -------------------------------------------------------------------------------- /functions/functions/lines/rapidloop.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "English": "3", 4 | "Hindi": "Vodafone Belvedere Towers", 5 | "Phase": "14 November 2013", 6 | "Opening": "None" 7 | }, 8 | { 9 | "English": "4", 10 | "Hindi": "IndusInd Bank Cyber City", 11 | "Phase": "7 May 2014", 12 | "Opening": "None" 13 | }, 14 | { 15 | "English": "5", 16 | "Hindi": "Micromax Moulsari Avenue", 17 | "Phase": "14 November 2013", 18 | "Opening": "None" 19 | }, 20 | { 21 | "English": "6", 22 | "Hindi": "Phase 3", 23 | "Phase": "14 November 2013", 24 | "Opening": "None" 25 | } 26 | ] -------------------------------------------------------------------------------- /functions/functions/lines/red.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "10": "None", 4 | "English": "1", 5 | "Hindi": "Shaheed Sthal", 6 | "Phase": "शहीद स्थल", 7 | "Opening": "3", 8 | "Interchange\nConnection": "8 March 2019", 9 | "Station Layout": "Bus Terminal", 10 | "Platform Level Type": "Elevated", 11 | "Depot Connection": "Side", 12 | "Depot Layout": "None" 13 | }, 14 | { 15 | "10": "None", 16 | "English": "2", 17 | "Hindi": "Hindon", 18 | "Phase": "हिंडन", 19 | "Opening": "3", 20 | "Interchange\nConnection": "8 March 2019", 21 | "Station Layout": "Bus Terminal", 22 | "Platform Level Type": "Elevated", 23 | "Depot Connection": "Side", 24 | "Depot Layout": "None" 25 | }, 26 | { 27 | "10": "None", 28 | "English": "3", 29 | "Hindi": "Arthala", 30 | "Phase": "अर्थला", 31 | "Opening": "3", 32 | "Interchange\nConnection": "8 March 2019", 33 | "Station Layout": "None", 34 | "Platform Level Type": "Elevated", 35 | "Depot Connection": "Side", 36 | "Depot Layout": "None" 37 | }, 38 | { 39 | "10": "None", 40 | "English": "4", 41 | "Hindi": "Mohan Nagar", 42 | "Phase": "मोहन नगर", 43 | "Opening": "3", 44 | "Interchange\nConnection": "8 March 2019", 45 | "Station Layout": "Bus Terminal", 46 | "Platform Level Type": "Elevated", 47 | "Depot Connection": "Side", 48 | "Depot Layout": "None" 49 | }, 50 | { 51 | "10": "None", 52 | "English": "5", 53 | "Hindi": "Shyam park", 54 | "Phase": "श्याम पार्क", 55 | "Opening": "3", 56 | "Interchange\nConnection": "8 March 2019", 57 | "Station Layout": "Indian Railways", 58 | "Platform Level Type": "Elevated", 59 | "Depot Connection": "Side", 60 | "Depot Layout": "None" 61 | }, 62 | { 63 | "10": "None", 64 | "English": "6", 65 | "Hindi": "Major Mohit Sharma", 66 | "Phase": "मे‌‌जर मोहित शर्मा", 67 | "Opening": "3", 68 | "Interchange\nConnection": "8 March 2019", 69 | "Station Layout": "Indian Railways", 70 | "Platform Level Type": "Elevated", 71 | "Depot Connection": "Side", 72 | "Depot Layout": "None" 73 | }, 74 | { 75 | "10": "None", 76 | "English": "7", 77 | "Hindi": "Raj Bagh", 78 | "Phase": "राज बाग", 79 | "Opening": "3", 80 | "Interchange\nConnection": "8 March 2019", 81 | "Station Layout": "None", 82 | "Platform Level Type": "Elevated", 83 | "Depot Connection": "Side", 84 | "Depot Layout": "None" 85 | }, 86 | { 87 | "10": "None", 88 | "English": "8", 89 | "Hindi": "Shaheed Nagar", 90 | "Phase": "शहीद नगर", 91 | "Opening": "3", 92 | "Interchange\nConnection": "8 March 2019", 93 | "Station Layout": "Bus Terminal", 94 | "Platform Level Type": "Elevated", 95 | "Depot Connection": "Side", 96 | "Depot Layout": "None" 97 | }, 98 | { 99 | "10": "None", 100 | "English": "9", 101 | "Hindi": "Dilshad Garden", 102 | "Phase": "दिलशाद गार्डन", 103 | "Opening": "2", 104 | "Interchange\nConnection": "4 June 2008", 105 | "Station Layout": "Indian Railways   Feeder Bus", 106 | "Platform Level Type": "Elevated", 107 | "Depot Connection": "Side", 108 | "Depot Layout": "None" 109 | }, 110 | { 111 | "10": "None", 112 | "English": "10", 113 | "Hindi": "Jhilmil", 114 | "Phase": "झिलमिल कालोनी", 115 | "Opening": "2", 116 | "Interchange\nConnection": "4 June 2008", 117 | "Station Layout": "Feeder Bus", 118 | "Platform Level Type": "Elevated", 119 | "Depot Connection": "Side", 120 | "Depot Layout": "None" 121 | }, 122 | { 123 | "10": "None", 124 | "English": "11", 125 | "Hindi": "Mansarovar Park", 126 | "Phase": "मानसरोवर पार्क", 127 | "Opening": "2", 128 | "Interchange\nConnection": "4 June 2008", 129 | "Station Layout": "Feeder Bus", 130 | "Platform Level Type": "Elevated", 131 | "Depot Connection": "Side", 132 | "Depot Layout": "None" 133 | }, 134 | { 135 | "10": "None", 136 | "English": "12", 137 | "Hindi": "Shahdara", 138 | "Phase": "शाहदरा", 139 | "Opening": "1", 140 | "Interchange\nConnection": "25 December 2002", 141 | "Station Layout": "Indian Railways   Bus Terminal", 142 | "Platform Level Type": "Elevated", 143 | "Depot Connection": "Side", 144 | "Depot Layout": "None" 145 | }, 146 | { 147 | "10": "None", 148 | "English": "13", 149 | "Hindi": "Welcome", 150 | "Phase": "वेलकम", 151 | "Opening": "1", 152 | "Interchange\nConnection": "25 December 2002", 153 | "Station Layout": "Pink Line   Feeder Bus", 154 | "Platform Level Type": "Elevated", 155 | "Depot Connection": "Island", 156 | "Depot Layout": "None" 157 | }, 158 | { 159 | "10": "None", 160 | "English": "14", 161 | "Hindi": "Seelampur", 162 | "Phase": "सीलमपुर", 163 | "Opening": "1", 164 | "Interchange\nConnection": "25 December 2002", 165 | "Station Layout": "Feeder Bus", 166 | "Platform Level Type": "Elevated", 167 | "Depot Connection": "Island", 168 | "Depot Layout": "None" 169 | }, 170 | { 171 | "10": "At Grade", 172 | "English": "15", 173 | "Hindi": "Shastri Park", 174 | "Phase": "शास्त्री पार्क", 175 | "Opening": "1", 176 | "Interchange\nConnection": "25 December 2002", 177 | "Station Layout": "Feeder Bus", 178 | "Platform Level Type": "At Grade", 179 | "Depot Connection": "Side", 180 | "Depot Layout": "Shastri Park Depot" 181 | }, 182 | { 183 | "10": "None", 184 | "English": "16", 185 | "Hindi": "Kashmere Gate", 186 | "Phase": "कश्मीरी गेट", 187 | "Opening": "1", 188 | "Interchange\nConnection": "25 December 2002", 189 | "Station Layout": "Yellow Line   Violet Line   ISBT", 190 | "Platform Level Type": "Elevated", 191 | "Depot Connection": "Side", 192 | "Depot Layout": "None" 193 | }, 194 | { 195 | "10": "None", 196 | "English": "17", 197 | "Hindi": "Tis Hazari", 198 | "Phase": "तीस हजारी", 199 | "Opening": "1", 200 | "Interchange\nConnection": "25 December 2002", 201 | "Station Layout": "Feeder Bus", 202 | "Platform Level Type": "Elevated", 203 | "Depot Connection": "Side", 204 | "Depot Layout": "None" 205 | }, 206 | { 207 | "10": "None", 208 | "English": "18", 209 | "Hindi": "Pul Bangash", 210 | "Phase": "पुल बंगाश", 211 | "Opening": "1", 212 | "Interchange\nConnection": "3 October 2003", 213 | "Station Layout": "Indian Railways", 214 | "Platform Level Type": "", 215 | "Depot Connection": "Side", 216 | "Depot Layout": "None" 217 | }, 218 | { 219 | "10": "None", 220 | "English": "19", 221 | "Hindi": "Pratap Nagar", 222 | "Phase": "प्रताप नगर", 223 | "Opening": "1", 224 | "Interchange\nConnection": "3 October 2003", 225 | "Station Layout": "Indian Railways", 226 | "Platform Level Type": "Elevated", 227 | "Depot Connection": "Side", 228 | "Depot Layout": "None" 229 | }, 230 | { 231 | "10": "None", 232 | "English": "20", 233 | "Hindi": "Shastri Nagar", 234 | "Phase": "शास्त्री नगर", 235 | "Opening": "1", 236 | "Interchange\nConnection": "3 October 2003", 237 | "Station Layout": "Indian Railways", 238 | "Platform Level Type": "Elevated", 239 | "Depot Connection": "Side", 240 | "Depot Layout": "None" 241 | }, 242 | { 243 | "10": "None", 244 | "English": "21", 245 | "Hindi": "Inderlok", 246 | "Phase": "इन्दरलोक", 247 | "Opening": "1", 248 | "Interchange\nConnection": "3 October 2003", 249 | "Station Layout": "Green Line   Feeder Bus", 250 | "Platform Level Type": "Elevated", 251 | "Depot Connection": "Side", 252 | "Depot Layout": "None" 253 | }, 254 | { 255 | "10": "None", 256 | "English": "22", 257 | "Hindi": "Kanhiya Nagar", 258 | "Phase": "कन्हैया नगर", 259 | "Opening": "2", 260 | "Interchange\nConnection": "31 March 2004", 261 | "Station Layout": "Feeder Bus", 262 | "Platform Level Type": "Elevated", 263 | "Depot Connection": "Side", 264 | "Depot Layout": "None" 265 | }, 266 | { 267 | "10": "None", 268 | "English": "23", 269 | "Hindi": "Keshav Puram", 270 | "Phase": "केशव पुरम", 271 | "Opening": "2", 272 | "Interchange\nConnection": "31 March 2004", 273 | "Station Layout": "Feeder Bus", 274 | "Platform Level Type": "Elevated", 275 | "Depot Connection": "Side", 276 | "Depot Layout": "None" 277 | }, 278 | { 279 | "10": "None", 280 | "English": "24", 281 | "Hindi": "Netaji Subhash Place", 282 | "Phase": "नेताजी सुभाष प्लेस", 283 | "Opening": "2", 284 | "Interchange\nConnection": "31 March 2004", 285 | "Station Layout": "Pink Line   Feeder Bus", 286 | "Platform Level Type": "Elevated", 287 | "Depot Connection": "Side", 288 | "Depot Layout": "None" 289 | }, 290 | { 291 | "10": "None", 292 | "English": "25", 293 | "Hindi": "Kohat Enclave", 294 | "Phase": "कोहाट एन्क्लेव", 295 | "Opening": "2", 296 | "Interchange\nConnection": "31 March 2004", 297 | "Station Layout": "Feeder Bus", 298 | "Platform Level Type": "Elevated", 299 | "Depot Connection": "Side", 300 | "Depot Layout": "None" 301 | }, 302 | { 303 | "10": "None", 304 | "English": "26", 305 | "Hindi": "Pitam Pura", 306 | "Phase": "पीतमपुरा", 307 | "Opening": "2", 308 | "Interchange\nConnection": "31 March 2004", 309 | "Station Layout": "Feeder Bus", 310 | "Platform Level Type": "Elevated", 311 | "Depot Connection": "Side", 312 | "Depot Layout": "None" 313 | }, 314 | { 315 | "10": "None", 316 | "English": "27", 317 | "Hindi": "Rohini East", 318 | "Phase": "रोहिणी पूर्व", 319 | "Opening": "2", 320 | "Interchange\nConnection": "31 March 2004", 321 | "Station Layout": "Feeder Bus", 322 | "Platform Level Type": "Elevated", 323 | "Depot Connection": "Side", 324 | "Depot Layout": "None" 325 | }, 326 | { 327 | "10": "None", 328 | "English": "28", 329 | "Hindi": "Rohini West", 330 | "Phase": "रोहिणी पश्चिम", 331 | "Opening": "2", 332 | "Interchange\nConnection": "31 March 2004", 333 | "Station Layout": "Feeder Bus", 334 | "Platform Level Type": "Elevated", 335 | "Depot Connection": "Side", 336 | "Depot Layout": "None" 337 | }, 338 | { 339 | "10": "None", 340 | "English": "29", 341 | "Hindi": "Rithala", 342 | "Phase": "रिठाला", 343 | "Opening": "2", 344 | "Interchange\nConnection": "31 March 2004", 345 | "Station Layout": "Bus Terminal", 346 | "Platform Level Type": "Elevated", 347 | "Depot Connection": "Side", 348 | "Depot Layout": "None" 349 | } 350 | ] -------------------------------------------------------------------------------- /functions/functions/lines/station_entity.json: -------------------------------------------------------------------------------- 1 | [ 2 | 3 | { 4 | "value": "AIIMS", 5 | "synonyms": [ 6 | "AIIMS", 7 | "All India Medical Institute" 8 | ] 9 | }, 10 | { 11 | "value": "Adarsh Nagar", 12 | "synonyms": [ 13 | "Adarsh Nagar" 14 | ] 15 | }, 16 | { 17 | "value": "Akshardham", 18 | "synonyms": [ 19 | "Akshardham" 20 | ] 21 | }, 22 | { 23 | "value": "Anand Vihar", 24 | "synonyms": [ 25 | "Anand Vihar ISBT", 26 | "ISBT" 27 | ] 28 | }, 29 | { 30 | "value": "Arjan Garh", 31 | "synonyms": [ 32 | "Arjan Garh" 33 | ] 34 | }, 35 | { 36 | "value": "Arthala", 37 | "synonyms": [ 38 | "Arthala" 39 | ] 40 | }, 41 | { 42 | "value": "Ashok Park Main", 43 | "synonyms": [ 44 | "Ashok Park Main", 45 | "Ashok Park" 46 | ] 47 | }, 48 | { 49 | "value": "Ashram", 50 | "synonyms": [ 51 | "Ashram" 52 | ] 53 | }, 54 | { 55 | "value": "Azadpur", 56 | "synonyms": [ 57 | "Azadpur" 58 | ] 59 | }, 60 | { 61 | "value": "Badarpur Border", 62 | "synonyms": [ 63 | "Badarpur Border", 64 | "Badarpur" 65 | ] 66 | }, 67 | { 68 | "value": "Badkhal Mor", 69 | "synonyms": [ 70 | "Badkhal Mor", 71 | "Badhkal" 72 | ] 73 | }, 74 | { 75 | "value": "Bahadurgarh City", 76 | "synonyms": [ 77 | "Bahadurgarh City", 78 | "Bahadurgarh" 79 | ] 80 | }, 81 | { 82 | "value": "Barakhambha Road", 83 | "synonyms": [ 84 | "Barakhambha Road", 85 | "Barakhambha", 86 | "Barakhamba" 87 | ] 88 | }, 89 | { 90 | "value": "Bata Chowk", 91 | "synonyms": [ 92 | "Bata Chowk" 93 | ] 94 | }, 95 | { 96 | "value": "Bhikaji Cama Place", 97 | "synonyms": [ 98 | "Bhikaji Cama Place", 99 | "Bhikaji Cama" 100 | ] 101 | }, 102 | { 103 | "value": "Botanical Garden", 104 | "synonyms": [ 105 | "Botanical Garden" 106 | ] 107 | }, 108 | { 109 | "value": "Brigadier Hoshiyar Singh", 110 | "synonyms": [ 111 | "Brigadier Hoshiyar Singh", 112 | "Hoshiyar Singh", 113 | "Brigadier Singh" 114 | ] 115 | }, 116 | { 117 | "value": "Central Secretariat", 118 | "synonyms": [ 119 | "Central Secretariat" 120 | ] 121 | }, 122 | { 123 | "value": "Chandni Chowk", 124 | "synonyms": [ 125 | "Chandni Chowk" 126 | ] 127 | }, 128 | { 129 | "value": "Chawri Bazar", 130 | "synonyms": [ 131 | "Chawri Bazar" 132 | ] 133 | }, 134 | { 135 | "value": "Chhatarpur", 136 | "synonyms": [ 137 | "Chhatarpur" 138 | ] 139 | }, 140 | { 141 | "value": "Chirag Delhi", 142 | "synonyms": [ 143 | "Chirag Delhi", 144 | "Chirag" 145 | ] 146 | }, 147 | { 148 | "value": "Civil Lines", 149 | "synonyms": [ 150 | "Civil Lines" 151 | ] 152 | }, 153 | { 154 | "value": "Dabri Mor-Janakpuri South", 155 | "synonyms": [ 156 | "Dabri Mor", 157 | "Janakpuri South", 158 | "Dabri" 159 | ] 160 | }, 161 | { 162 | "value": "Dashrath Puri", 163 | "synonyms": [ 164 | "Dashrath Puri", 165 | "Dashrathpuri", 166 | "Dashratpuri" 167 | ] 168 | }, 169 | { 170 | "value": "Delhi Aerocity", 171 | "synonyms": [ 172 | "Delhi Aerocity", 173 | "Aerocity" 174 | ] 175 | }, 176 | { 177 | "value": "Delhi Cantonment", 178 | "synonyms": [ 179 | "Delhi Cantonment", 180 | "Delhi Cantt", 181 | "Cantonment", 182 | "Cantt" 183 | ] 184 | }, 185 | { 186 | "value": "Delhi Gate", 187 | "synonyms": [ 188 | "Delhi Gate" 189 | ] 190 | }, 191 | { 192 | "value": "Dhaula Kuan", 193 | "synonyms": [ 194 | "Dhaula Kuan" 195 | ] 196 | }, 197 | { 198 | "value": "Dilshad Garden", 199 | "synonyms": [ 200 | "Dilshad Garden" 201 | ] 202 | }, 203 | { 204 | "value": "Durgabai Deshmukh South Campus", 205 | "synonyms": [ 206 | "Durgabai Deshmukh South Campus", 207 | "Durgabai Dekhmukh", 208 | "South Campus" 209 | ] 210 | }, 211 | { 212 | "value": "Dwarka", 213 | "synonyms": [ 214 | "Dwarka" 215 | ] 216 | }, 217 | { 218 | "value": "Dwarka Mor", 219 | "synonyms": [ 220 | "Dwarka Mor" 221 | ] 222 | }, 223 | { 224 | "value": "Dwarka Sector 10", 225 | "synonyms": [ 226 | "Dwarka Sector 10" 227 | ] 228 | }, 229 | { 230 | "value": "Dwarka Sector 11", 231 | "synonyms": [ 232 | "Dwarka Sector 11" 233 | ] 234 | }, 235 | { 236 | "value": "Dwarka Sector 12", 237 | "synonyms": [ 238 | "Dwarka Sector 12" 239 | ] 240 | }, 241 | { 242 | "value": "Dwarka Sector 13", 243 | "synonyms": [ 244 | "Dwarka Sector 13" 245 | ] 246 | }, 247 | { 248 | "value": "Dwarka Sector 14", 249 | "synonyms": [ 250 | "Dwarka Sector 14" 251 | ] 252 | }, 253 | { 254 | "value": "Dwarka Sector 21", 255 | "synonyms": [ 256 | "Dwarka Sector 21" 257 | ] 258 | }, 259 | { 260 | "value": "Dwarka Sector 8", 261 | "synonyms": [ 262 | "Dwarka Sector 8" 263 | ] 264 | }, 265 | { 266 | "value": "Dwarka Sector 9", 267 | "synonyms": [ 268 | "Dwarka Sector 9" 269 | ] 270 | }, 271 | { 272 | "value": "ESI Hospital", 273 | "synonyms": [ 274 | "ESI Hospital", 275 | "ESI Basaidarpur", 276 | "ESI" 277 | ] 278 | }, 279 | { 280 | "value": "East Azad Nagar", 281 | "synonyms": [ 282 | "East Azad Nagar", 283 | "Azad Nagar East" 284 | ] 285 | }, 286 | { 287 | "value": "East Vinod Nagar – Mayur Vihar-II", 288 | "synonyms": [ 289 | "East Vinod Nagar – Mayur Vihar-II", 290 | "East Vinod Nagar", 291 | "Mayur Vihar-II", 292 | "Mayur Vihar 2" 293 | ] 294 | }, 295 | { 296 | "value": "Escorts Mujesar", 297 | "synonyms": [ 298 | "Escorts Mujesar", 299 | "Escorts" 300 | ] 301 | }, 302 | { 303 | "value": "GTB Nagar", 304 | "synonyms": [ 305 | "GTB Nagar", 306 | "Guru Tegh Bahadur Nagar", 307 | "GTB" 308 | ] 309 | }, 310 | { 311 | "value": "Ghevra", 312 | "synonyms": [ 313 | "Ghevra" 314 | ] 315 | }, 316 | { 317 | "value": "Ghitorni", 318 | "synonyms": [ 319 | "Ghitorni" 320 | ] 321 | }, 322 | { 323 | "value": "Gokulpuri", 324 | "synonyms": [ 325 | "Gokulpuri" 326 | ] 327 | }, 328 | { 329 | "value": "Golf Course", 330 | "synonyms": [ 331 | "Golf Course" 332 | ] 333 | }, 334 | { 335 | "value": "Govind Puri", 336 | "synonyms": [ 337 | "Govind Puri" 338 | ] 339 | }, 340 | { 341 | "value": "Greater Kailash", 342 | "synonyms": [ 343 | "Greater Kailash" 344 | ] 345 | }, 346 | { 347 | "value": "Green Park", 348 | "synonyms": [ 349 | "Green Park" 350 | ] 351 | }, 352 | { 353 | "value": "Guru Dronacharya", 354 | "synonyms": [ 355 | "Guru Dronacharya", 356 | "Dronacharya" 357 | ] 358 | }, 359 | { 360 | "value": "HUDA City Centre", 361 | "synonyms": [ 362 | "HUDA City Centre", 363 | "HUDA" 364 | ] 365 | }, 366 | { 367 | "value": "Haiderpur", 368 | "synonyms": [ 369 | "Haiderpur", 370 | "Badli Mor" 371 | ] 372 | }, 373 | { 374 | "value": "Harkesh Nagar Okhla", 375 | "synonyms": [ 376 | "Harkesh Nagar Okhla", 377 | "Harkesh Nagar" 378 | ] 379 | }, 380 | { 381 | "value": "Hauz Khas", 382 | "synonyms": [ 383 | "Hauz Khas" 384 | ] 385 | }, 386 | { 387 | "value": "Hazrat Nizamuddin", 388 | "synonyms": [ 389 | "Hazrat Nizamuddin", 390 | "Nizamuddin", 391 | "Nizamuddin Station", 392 | "Sarai Kale Khan" 393 | ] 394 | }, 395 | { 396 | "value": "Hindon", 397 | "synonyms": [ 398 | "Hindon" 399 | ] 400 | }, 401 | { 402 | "value": "IFFCO Chowk", 403 | "synonyms": [ 404 | "IFFCO Chowk", 405 | "IFFCO" 406 | ] 407 | }, 408 | { 409 | "value": "IIT Delhi", 410 | "synonyms": [ 411 | "IIT Delhi", 412 | "IIT" 413 | ] 414 | }, 415 | { 416 | "value": "INA", 417 | "synonyms": [ 418 | "INA", 419 | "I.N.A." 420 | ] 421 | }, 422 | { 423 | "value": "IP Extension", 424 | "synonyms": [ 425 | "IP Extension", 426 | "I.P. Extension", 427 | "Indraprastha Extension" 428 | ] 429 | }, 430 | { 431 | "value": "ITO", 432 | "synonyms": [ 433 | "ITO", 434 | "I.T.O" 435 | ] 436 | }, 437 | { 438 | "value": "Inderlok", 439 | "synonyms": [ 440 | "Inderlok" 441 | ] 442 | }, 443 | { 444 | "value": "Indira Gandhi International Airport", 445 | "synonyms": [ 446 | "Indira Gandhi International Airport", 447 | "IGI Airport", 448 | "IGI", 449 | "Airport", 450 | "T3", 451 | "Terminal 3", 452 | "Indira Gandhi International Airport Terminal 3", 453 | "Indira Gandhi International Airport T3", 454 | "IGI Airport Terminal 3", 455 | "IGI Airport T3" 456 | ] 457 | }, 458 | { 459 | "value": "Indraprastha", 460 | "synonyms": [ 461 | "Indraprastha" 462 | ] 463 | }, 464 | { 465 | "value": "Jaffrabad", 466 | "synonyms": [ 467 | "Jaffrabad" 468 | ] 469 | }, 470 | { 471 | "value": "Jahangirpuri", 472 | "synonyms": [ 473 | "Jahangirpuri" 474 | ] 475 | }, 476 | { 477 | "value": "Jama Masjid", 478 | "synonyms": [ 479 | "Jama Masjid" 480 | ] 481 | }, 482 | { 483 | "value": "Jamia Millia Islamia", 484 | "synonyms": [ 485 | "Jamia Millia Islamia", 486 | "Jamia Millia" 487 | ] 488 | }, 489 | { 490 | "value": "Janakpuri East", 491 | "synonyms": [ 492 | "Janakpuri East" 493 | ] 494 | }, 495 | { 496 | "value": "Janakpuri West", 497 | "synonyms": [ 498 | "Janakpuri West", 499 | "Janakpuri" 500 | ] 501 | }, 502 | { 503 | "value": "Jangpura", 504 | "synonyms": [ 505 | "Jangpura" 506 | ] 507 | }, 508 | { 509 | "value": "Janpath", 510 | "synonyms": [ 511 | "Janpath" 512 | ] 513 | }, 514 | { 515 | "value": "Jasola Apollo", 516 | "synonyms": [ 517 | "Jasola Apollo", 518 | "Jasola", 519 | "Apollo" 520 | ] 521 | }, 522 | { 523 | "value": "Jasola Vihar Shaheen Bagh", 524 | "synonyms": [ 525 | "Jasola Vihar Shaheen Bagh", 526 | "Jasola Vihar", 527 | "Shaheen Bagh" 528 | ] 529 | }, 530 | { 531 | "value": "Jawaharlal Nehru Stadium", 532 | "synonyms": [ 533 | "Jawaharlal Nehru Stadium" 534 | ] 535 | }, 536 | { 537 | "value": "Jhandewalan", 538 | "synonyms": [ 539 | "Jhandewalan" 540 | ] 541 | }, 542 | { 543 | "value": "Jhilmil", 544 | "synonyms": [ 545 | "Jhilmil" 546 | ] 547 | }, 548 | { 549 | "value": "Johari Enclave", 550 | "synonyms": [ 551 | "Johari Enclave" 552 | ] 553 | }, 554 | { 555 | "value": "Jor Bagh", 556 | "synonyms": [ 557 | "Jor Bagh", 558 | "Jorbagh" 559 | ] 560 | }, 561 | { 562 | "value": "Kailash Colony", 563 | "synonyms": [ 564 | "Kailash Colony" 565 | ] 566 | }, 567 | { 568 | "value": "Kalindi Kunj", 569 | "synonyms": [ 570 | "Kalindi Kunj" 571 | ] 572 | }, 573 | { 574 | "value": "Kalkaji Mandir", 575 | "synonyms": [ 576 | "Kalkaji Mandir" 577 | ] 578 | }, 579 | { 580 | "value": "Kanhaiya Nagar", 581 | "synonyms": [ 582 | "Kanhaiya Nagar" 583 | ] 584 | }, 585 | { 586 | "value": "Karkarduma", 587 | "synonyms": [ 588 | "Karkarduma", 589 | "Karkardooma" 590 | ] 591 | }, 592 | { 593 | "value": "Karkarduma Court", 594 | "synonyms": [ 595 | "Karkarduma Court", 596 | "Karkardooma Court" 597 | ] 598 | }, 599 | { 600 | "value": "Karol Bagh", 601 | "synonyms": [ 602 | "Karol Bagh" 603 | ] 604 | }, 605 | { 606 | "value": "Kashmere Gate", 607 | "synonyms": [ 608 | "Kashmere Gate" 609 | ] 610 | }, 611 | { 612 | "value": "Kaushambi", 613 | "synonyms": [ 614 | "Kaushambi" 615 | ] 616 | }, 617 | { 618 | "value": "Keshav Puram", 619 | "synonyms": [ 620 | "Keshav Puram" 621 | ] 622 | }, 623 | { 624 | "value": "Khan Market", 625 | "synonyms": [ 626 | "Khan Market" 627 | ] 628 | }, 629 | { 630 | "value": "Kirti Nagar", 631 | "synonyms": [ 632 | "Kirti Nagar" 633 | ] 634 | }, 635 | { 636 | "value": "Kohat Enclave", 637 | "synonyms": [ 638 | "Kohat Enclave" 639 | ] 640 | }, 641 | { 642 | "value": "Krishna Nagar", 643 | "synonyms": [ 644 | "Krishna Nagar" 645 | ] 646 | }, 647 | { 648 | "value": "Lajpat Nagar", 649 | "synonyms": [ 650 | "Lajpat Nagar" 651 | ] 652 | }, 653 | { 654 | "value": "Lal Qila", 655 | "synonyms": [ 656 | "Lal Qila" 657 | ] 658 | }, 659 | { 660 | "value": "Laxmi Nagar", 661 | "synonyms": [ 662 | "Laxmi Nagar", 663 | "Lakshmi Nagar" 664 | ] 665 | }, 666 | { 667 | "value": "Lok Kalyan Marg", 668 | "synonyms": [ 669 | "Lok Kalyan Marg", 670 | "Lok Kalyan", 671 | "Kalyan Marg" 672 | ] 673 | }, 674 | { 675 | "value": "MG Road", 676 | "synonyms": [ 677 | "MG Road", 678 | "Mahatma Gandhi Road" 679 | ] 680 | }, 681 | { 682 | "value": "Madipur", 683 | "synonyms": [ 684 | "Madipur" 685 | ] 686 | }, 687 | { 688 | "value": "Maharaja Surajmal Stadium", 689 | "synonyms": [ 690 | "Maharaja Surajmal Stadium", 691 | "Surajmal Stadium" 692 | ] 693 | }, 694 | { 695 | "value": "Majlis Park", 696 | "synonyms": [ 697 | "Majlis Park", 698 | "Majlis" 699 | ] 700 | }, 701 | { 702 | "value": "Major Mohit Sharma", 703 | "synonyms": [ 704 | "Major Mohit Sharma", 705 | "Major Sharma", 706 | "Mohit Sharma" 707 | ] 708 | }, 709 | { 710 | "value": "Malviya Nagar", 711 | "synonyms": [ 712 | "Malviya Nagar" 713 | ] 714 | }, 715 | { 716 | "value": "Mandawali – West Vinod Nagar", 717 | "synonyms": [ 718 | "Mandawali – West Vinod Nagar", 719 | "Mandawali", 720 | "West Vinod Nagar" 721 | ] 722 | }, 723 | { 724 | "value": "Mandi House", 725 | "synonyms": [ 726 | "Mandi House" 727 | ] 728 | }, 729 | { 730 | "value": "Mansarovar Park", 731 | "synonyms": [ 732 | "Mansarovar Park", 733 | "Mansarovar" 734 | ] 735 | }, 736 | { 737 | "value": "Maujpur-Babarpur", 738 | "synonyms": [ 739 | "Maujpur-Babarpur", 740 | "Maujpur", 741 | "Babarpur" 742 | ] 743 | }, 744 | { 745 | "value": "Mayapuri", 746 | "synonyms": [ 747 | "Mayapuri" 748 | ] 749 | }, 750 | { 751 | "value": "Mayur Vihar - I", 752 | "synonyms": [ 753 | "Mayur Vihar - I", 754 | "Mayur Vihar 1" 755 | ] 756 | }, 757 | { 758 | "value": "Mayur Vihar Extension", 759 | "synonyms": [ 760 | "Mayur Vihar Extension" 761 | ] 762 | }, 763 | { 764 | "value": "Mayur Vihar Pocket I", 765 | "synonyms": [ 766 | "Mayur Vihar Pocket I", 767 | "Mayur Vihar Pocket 1" 768 | ] 769 | }, 770 | { 771 | "value": "Mewala Maharajpur", 772 | "synonyms": [ 773 | "Mewala Maharajpur", 774 | "Mewala", 775 | "Maharajpur" 776 | ] 777 | }, 778 | { 779 | "value": "Model Town", 780 | "synonyms": [ 781 | "Model Town" 782 | ] 783 | }, 784 | { 785 | "value": "Mohan Estate", 786 | "synonyms": [ 787 | "Mohan Estate" 788 | ] 789 | }, 790 | { 791 | "value": "Mohan Nagar", 792 | "synonyms": [ 793 | "Mohan Nagar" 794 | ] 795 | }, 796 | { 797 | "value": "Moolchand", 798 | "synonyms": [ 799 | "Moolchand" 800 | ] 801 | }, 802 | { 803 | "value": "Moti Nagar", 804 | "synonyms": [ 805 | "Moti Nagar" 806 | ] 807 | }, 808 | { 809 | "value": "Mundka", 810 | "synonyms": [ 811 | "Mundka" 812 | ] 813 | }, 814 | { 815 | "value": "Mundka Industrial Area", 816 | "synonyms": [ 817 | "Mundka Industrial Area", 818 | "MIA", 819 | "M.I.A" 820 | ] 821 | }, 822 | { 823 | "value": "Munirka", 824 | "synonyms": [ 825 | "Munirka" 826 | ] 827 | }, 828 | { 829 | "value": "NHPC Chowk", 830 | "synonyms": [ 831 | "NHPC Chowk", 832 | "NHPC" 833 | ] 834 | }, 835 | { 836 | "value": "Nangloi", 837 | "synonyms": [ 838 | "Nangloi" 839 | ] 840 | }, 841 | { 842 | "value": "Nangloi Railway station", 843 | "synonyms": [ 844 | "Nangloi Railway station" 845 | ] 846 | }, 847 | { 848 | "value": "Naraina Vihar", 849 | "synonyms": [ 850 | "Naraina Vihar", 851 | "Naraina" 852 | ] 853 | }, 854 | { 855 | "value": "Nawada", 856 | "synonyms": [ 857 | "Nawada" 858 | ] 859 | }, 860 | { 861 | "value": "Neelam Chowk Ajronda", 862 | "synonyms": [ 863 | "Neelam Chowk Ajronda", 864 | "Neelam Chowk", 865 | "Ajronda" 866 | ] 867 | }, 868 | { 869 | "value": "Nehru Enclave", 870 | "synonyms": [ 871 | "Nehru Enclave" 872 | ] 873 | }, 874 | { 875 | "value": "Nehru Place", 876 | "synonyms": [ 877 | "Nehru Place" 878 | ] 879 | }, 880 | { 881 | "value": "Netaji Subhash Place", 882 | "synonyms": [ 883 | "Netaji Subhash Place", 884 | "NSP", 885 | "N.S.P." 886 | ] 887 | }, 888 | { 889 | "value": "New Ashok Nagar", 890 | "synonyms": [ 891 | "New Ashok Nagar" 892 | ] 893 | }, 894 | { 895 | "value": "New Delhi", 896 | "synonyms": [ 897 | "New Delhi", 898 | "New Delhi Railway Station", 899 | "Delhi Railway Station", 900 | "Railway Station" 901 | ] 902 | }, 903 | { 904 | "value": "Nirman Vihar", 905 | "synonyms": [ 906 | "Nirman Vihar" 907 | ] 908 | }, 909 | { 910 | "value": "Noida City Centre", 911 | "synonyms": [ 912 | "Noida City Centre", 913 | "Noida" 914 | ] 915 | }, 916 | { 917 | "value": "Noida Electronic City", 918 | "synonyms": [ 919 | "Noida Electronic City" 920 | ] 921 | }, 922 | { 923 | "value": "Noida Sector 15", 924 | "synonyms": [ 925 | "Noida Sector 15" 926 | ] 927 | }, 928 | { 929 | "value": "Noida Sector 16", 930 | "synonyms": [ 931 | "Noida Sector 16" 932 | ] 933 | }, 934 | { 935 | "value": "Noida Sector 18", 936 | "synonyms": [ 937 | "Noida Sector 18" 938 | ] 939 | }, 940 | { 941 | "value": "Noida Sector 34", 942 | "synonyms": [ 943 | "Noida Sector 34" 944 | ] 945 | }, 946 | { 947 | "value": "Noida Sector 52*", 948 | "synonyms": [ 949 | "Noida Sector 52*" 950 | ] 951 | }, 952 | { 953 | "value": "Noida Sector 59", 954 | "synonyms": [ 955 | "Noida Sector 59" 956 | ] 957 | }, 958 | { 959 | "value": "Noida Sector 61", 960 | "synonyms": [ 961 | "Noida Sector 61" 962 | ] 963 | }, 964 | { 965 | "value": "Noida Sector 62", 966 | "synonyms": [ 967 | "Noida Sector 62" 968 | ] 969 | }, 970 | { 971 | "value": "Okhla Bird Sanctuary", 972 | "synonyms": [ 973 | "Okhla Bird Sanctuary", 974 | "Bird Sanctuary" 975 | ] 976 | }, 977 | { 978 | "value": "Okhla NSIC", 979 | "synonyms": [ 980 | "Okhla NSIC" 981 | ] 982 | }, 983 | { 984 | "value": "Okhla Vihar", 985 | "synonyms": [ 986 | "Okhla Vihar" 987 | ] 988 | }, 989 | { 990 | "value": "Old Faridabad", 991 | "synonyms": [ 992 | "Old Faridabad" 993 | ] 994 | }, 995 | { 996 | "value": "Palam", 997 | "synonyms": [ 998 | "Palam" 999 | ] 1000 | }, 1001 | { 1002 | "value": "Panchsheel Park", 1003 | "synonyms": [ 1004 | "Panchsheel Park" 1005 | ] 1006 | }, 1007 | { 1008 | "value": "Pandit Shree Ram Sharma", 1009 | "synonyms": [ 1010 | "Pandit Shree Ram Sharma", 1011 | "Shree Ram Sharma", 1012 | "Pandit Ram Sharma", 1013 | "Pandit Sharma", 1014 | "Pandit Ram", 1015 | "Shree Ram" 1016 | ] 1017 | }, 1018 | { 1019 | "value": "Paschim Vihar East", 1020 | "synonyms": [ 1021 | "Paschim Vihar East" 1022 | ] 1023 | }, 1024 | { 1025 | "value": "Paschim Vihar West", 1026 | "synonyms": [ 1027 | "Paschim Vihar West" 1028 | ] 1029 | }, 1030 | { 1031 | "value": "Patel Chowk", 1032 | "synonyms": [ 1033 | "Patel Chowk" 1034 | ] 1035 | }, 1036 | { 1037 | "value": "Patel Nagar", 1038 | "synonyms": [ 1039 | "Patel Nagar" 1040 | ] 1041 | }, 1042 | { 1043 | "value": "Peera Garhi", 1044 | "synonyms": [ 1045 | "Peera Garhi", 1046 | "Peeragarhi", 1047 | "Peeragari", 1048 | "Peeragadi" 1049 | ] 1050 | }, 1051 | { 1052 | "value": "Pitam Pura", 1053 | "synonyms": [ 1054 | "Pitam Pura", 1055 | "Pitampura" 1056 | ] 1057 | }, 1058 | { 1059 | "value": "Pragati Maidan", 1060 | "synonyms": [ 1061 | "Pragati Maidan" 1062 | ] 1063 | }, 1064 | { 1065 | "value": "Pratap Nagar", 1066 | "synonyms": [ 1067 | "Pratap Nagar" 1068 | ] 1069 | }, 1070 | { 1071 | "value": "Preet Vihar", 1072 | "synonyms": [ 1073 | "Preet Vihar" 1074 | ] 1075 | }, 1076 | { 1077 | "value": "Pul Bangash", 1078 | "synonyms": [ 1079 | "Pul Bangash" 1080 | ] 1081 | }, 1082 | { 1083 | "value": "Punjabi Bagh", 1084 | "synonyms": [ 1085 | "Punjabi Bagh" 1086 | ] 1087 | }, 1088 | { 1089 | "value": "Punjabi Bagh West", 1090 | "synonyms": [ 1091 | "Punjabi Bagh West" 1092 | ] 1093 | }, 1094 | { 1095 | "value": "Qutab Minar", 1096 | "synonyms": [ 1097 | "Qutab Minar" 1098 | ] 1099 | }, 1100 | { 1101 | "value": "R.K.Puram", 1102 | "synonyms": [ 1103 | "R.K.Puram", 1104 | "RK Puram" 1105 | ] 1106 | }, 1107 | { 1108 | "value": "Raj Bagh", 1109 | "synonyms": [ 1110 | "Raj Bagh", 1111 | "Rajbagh" 1112 | ] 1113 | }, 1114 | { 1115 | "value": "Raja Nahar Singh", 1116 | "synonyms": [ 1117 | "Raja Nahar Singh", 1118 | "Nahar Singh", 1119 | "Ballabhgarh" 1120 | ] 1121 | }, 1122 | { 1123 | "value": "Rajdhani Park", 1124 | "synonyms": [ 1125 | "Rajdhani Park" 1126 | ] 1127 | }, 1128 | { 1129 | "value": "Rajendra Place", 1130 | "synonyms": [ 1131 | "Rajendra Place" 1132 | ] 1133 | }, 1134 | { 1135 | "value": "Rajiv Chowk", 1136 | "synonyms": [ 1137 | "Rajiv Chowk", 1138 | "Connaught Place", 1139 | "CP", 1140 | "C.P." 1141 | ] 1142 | }, 1143 | { 1144 | "value": "Rajouri Garden", 1145 | "synonyms": [ 1146 | "Rajouri Garden" 1147 | ] 1148 | }, 1149 | { 1150 | "value": "Ramakrishna Ashram Marg", 1151 | "synonyms": [ 1152 | "Ramakrishna Ashram Marg", 1153 | "Ramakrishna Marg", 1154 | "Ashram Marg" 1155 | ] 1156 | }, 1157 | { 1158 | "value": "Ramesh Nagar", 1159 | "synonyms": [ 1160 | "Ramesh Nagar" 1161 | ] 1162 | }, 1163 | { 1164 | "value": "Rithala", 1165 | "synonyms": [ 1166 | "Rithala" 1167 | ] 1168 | }, 1169 | { 1170 | "value": "Rohini East", 1171 | "synonyms": [ 1172 | "Rohini East" 1173 | ] 1174 | }, 1175 | { 1176 | "value": "Rohini Sector 18", 1177 | "synonyms": [ 1178 | "Rohini Sector 18", 1179 | "Rohini Sector 19" 1180 | ] 1181 | }, 1182 | { 1183 | "value": "Rohini West", 1184 | "synonyms": [ 1185 | "Rohini West" 1186 | ] 1187 | }, 1188 | { 1189 | "value": "Sadar Bazaar Cantonment", 1190 | "synonyms": [ 1191 | "Sadar Bazaar Cantonment", 1192 | "sadar Bazaar", 1193 | "Sadar Bazar", 1194 | "Sadar Bazar Cantonment", 1195 | "Sadar Bazaar Cantt", 1196 | "Sadar Bazar Cantt" 1197 | ] 1198 | }, 1199 | { 1200 | "value": "Saket", 1201 | "synonyms": [ 1202 | "Saket" 1203 | ] 1204 | }, 1205 | { 1206 | "value": "Samaypur Badli", 1207 | "synonyms": [ 1208 | "Samaypur Badli", 1209 | "Badli", 1210 | "Samaypur" 1211 | ] 1212 | }, 1213 | { 1214 | "value": "Sant Surdas", 1215 | "synonyms": [ 1216 | "Sant Surdas", 1217 | "Surdas", 1218 | "Sihi", 1219 | "NCB Colony", 1220 | "Good Year" 1221 | ] 1222 | }, 1223 | { 1224 | "value": "Sarai", 1225 | "synonyms": [ 1226 | "Sarai" 1227 | ] 1228 | }, 1229 | { 1230 | "value": "Sarita Vihar", 1231 | "synonyms": [ 1232 | "Sarita Vihar" 1233 | ] 1234 | }, 1235 | { 1236 | "value": "Sarojini Nagar", 1237 | "synonyms": [ 1238 | "Sarojini Nagar", 1239 | "Sarojini" 1240 | ] 1241 | }, 1242 | { 1243 | "value": "Satguru Ramsingh Marg", 1244 | "synonyms": [ 1245 | "Satguru Ramsingh Marg", 1246 | "Ramsingh Marg", 1247 | "Ram Singh Marg" 1248 | ] 1249 | }, 1250 | { 1251 | "value": "Sector 28", 1252 | "synonyms": [ 1253 | "Sector 28" 1254 | ] 1255 | }, 1256 | { 1257 | "value": "Seelampur", 1258 | "synonyms": [ 1259 | "Seelampur" 1260 | ] 1261 | }, 1262 | { 1263 | "value": "Shadipur", 1264 | "synonyms": [ 1265 | "Shadipur" 1266 | ] 1267 | }, 1268 | { 1269 | "value": "Shahdara", 1270 | "synonyms": [ 1271 | "Shahdara" 1272 | ] 1273 | }, 1274 | { 1275 | "value": "Shaheed Nagar", 1276 | "synonyms": [ 1277 | "Shaheed Nagar" 1278 | ] 1279 | }, 1280 | { 1281 | "value": "Shaheed Sthal", 1282 | "synonyms": [ 1283 | "Shaheed Sthal" 1284 | ] 1285 | }, 1286 | { 1287 | "value": "Shakurpur", 1288 | "synonyms": [ 1289 | "Shakurpur" 1290 | ] 1291 | }, 1292 | { 1293 | "value": "Shalimar Bagh", 1294 | "synonyms": [ 1295 | "Shalimar Bagh" 1296 | ] 1297 | }, 1298 | { 1299 | "value": "Shankar Vihar", 1300 | "synonyms": [ 1301 | "Shankar Vihar" 1302 | ] 1303 | }, 1304 | { 1305 | "value": "Shastri Nagar", 1306 | "synonyms": [ 1307 | "Shastri Nagar" 1308 | ] 1309 | }, 1310 | { 1311 | "value": "Shastri Park", 1312 | "synonyms": [ 1313 | "Shastri Park" 1314 | ] 1315 | }, 1316 | { 1317 | "value": "Shiv Vihar", 1318 | "synonyms": [ 1319 | "Shiv Vihar" 1320 | ] 1321 | }, 1322 | { 1323 | "value": "Shivaji Park", 1324 | "synonyms": [ 1325 | "Shivaji Park" 1326 | ] 1327 | }, 1328 | { 1329 | "value": "Shivaji Stadium", 1330 | "synonyms": [ 1331 | "Shivaji Stadium" 1332 | ] 1333 | }, 1334 | { 1335 | "value": "Shyam Park", 1336 | "synonyms": [ 1337 | "Shyam Park" 1338 | ] 1339 | }, 1340 | { 1341 | "value": "Sikandarpur", 1342 | "synonyms": [ 1343 | "Sikandarpur" 1344 | ] 1345 | }, 1346 | { 1347 | "value": "Sir Vishweshwaraiah Moti Bagh", 1348 | "synonyms": [ 1349 | "Sir Vishweshwaraiah Moti Bagh", 1350 | "Moti Bagh" 1351 | ] 1352 | }, 1353 | { 1354 | "value": "South Extension", 1355 | "synonyms": [ 1356 | "South Extension" 1357 | ] 1358 | }, 1359 | { 1360 | "value": "Subhash Nagar", 1361 | "synonyms": [ 1362 | "Subhash Nagar" 1363 | ] 1364 | }, 1365 | { 1366 | "value": "Sukhdev Vihar", 1367 | "synonyms": [ 1368 | "Sukhdev Vihar" 1369 | ] 1370 | }, 1371 | { 1372 | "value": "Sultanpur", 1373 | "synonyms": [ 1374 | "Sultanpur" 1375 | ] 1376 | }, 1377 | { 1378 | "value": "Tagore Garden", 1379 | "synonyms": [ 1380 | "Tagore Garden" 1381 | ] 1382 | }, 1383 | { 1384 | "value": "Terminal 1-IGI Airport", 1385 | "synonyms": [ 1386 | "Terminal 1-IGI Airport", 1387 | "Terminal 1", 1388 | "IGI Airport T1", 1389 | "IGI Airport Terminal 1" , 1390 | "Terminal 1 IGI Airport", 1391 | "Indira Gandhi International Airport Terminal 1", 1392 | "Indira Gandhi International Airport T1" 1393 | 1394 | ] 1395 | }, 1396 | { 1397 | "value": "Tikri Border", 1398 | "synonyms": [ 1399 | "Tikri Border" 1400 | ] 1401 | }, 1402 | { 1403 | "value": "Tikri Kalan", 1404 | "synonyms": [ 1405 | "Tikri Kalan" 1406 | ] 1407 | }, 1408 | { 1409 | "value": "Tilak Nagar", 1410 | "synonyms": [ 1411 | "Tilak Nagar" 1412 | ] 1413 | }, 1414 | { 1415 | "value": "Tis Hazari", 1416 | "synonyms": [ 1417 | "Tis Hazari" 1418 | ] 1419 | }, 1420 | { 1421 | "value": "Trilokpuri Sanjay Lake", 1422 | "synonyms": [ 1423 | "Trilokpuri Sanjay Lake", 1424 | "Trilokpuri", 1425 | "Sanjay Lake" 1426 | ] 1427 | }, 1428 | { 1429 | "value": "Tughlakabad Station", 1430 | "synonyms": [ 1431 | "Tughlakabad Station", 1432 | "Tughlakabad" 1433 | ] 1434 | }, 1435 | { 1436 | "value": "Udyog Bhawan", 1437 | "synonyms": [ 1438 | "Udyog Bhawan" 1439 | ] 1440 | }, 1441 | { 1442 | "value": "Udyog Nagar", 1443 | "synonyms": [ 1444 | "Udyog Nagar" 1445 | ] 1446 | }, 1447 | { 1448 | "value": "Uttam Nagar East", 1449 | "synonyms": [ 1450 | "Uttam Nagar East" 1451 | ] 1452 | }, 1453 | { 1454 | "value": "Uttam Nagar West", 1455 | "synonyms": [ 1456 | "Uttam Nagar West" 1457 | ] 1458 | }, 1459 | { 1460 | "value": "Vaishali", 1461 | "synonyms": [ 1462 | "Vaishali" 1463 | ] 1464 | }, 1465 | { 1466 | "value": "Vasant Vihar", 1467 | "synonyms": [ 1468 | "Vasant Vihar" 1469 | ] 1470 | }, 1471 | { 1472 | "value": "Vidhan Sabha", 1473 | "synonyms": [ 1474 | "Vidhan Sabha" 1475 | ] 1476 | }, 1477 | { 1478 | "value": "Vinobapuri", 1479 | "synonyms": [ 1480 | "Vinobapuri" 1481 | ] 1482 | }, 1483 | { 1484 | "value": "Vishwa Vidyalaya", 1485 | "synonyms": [ 1486 | "Vishwa Vidyalaya", 1487 | "Vishwavidyalaya", 1488 | "North Campus" 1489 | ] 1490 | }, 1491 | { 1492 | "value": "Welcome", 1493 | "synonyms": [ 1494 | "Welcome" 1495 | ] 1496 | }, 1497 | { 1498 | "value": "Yamuna Bank", 1499 | "synonyms": [ 1500 | "Yamuna Bank" 1501 | ] 1502 | }, 1503 | { 1504 | "value": "", 1505 | "synonyms": [] 1506 | } 1507 | ] -------------------------------------------------------------------------------- /functions/functions/lines/violet.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "10": "None", 4 | "English": "5", 5 | "Hindi": "Kashmere Gate", 6 | "Phase": "कश्मीरी गेट", 7 | "Opening": "3", 8 | "Interchange\nConnection": "20 December 2004", 9 | "Station Layout": "Red Line   Yellow Line   ISBT", 10 | "Platform Level Type": "Underground", 11 | "Depot Connection": "Island", 12 | "Depot Layout": "None" 13 | }, 14 | { 15 | "English": "6", 16 | "Hindi": "Lal Qila", 17 | "Phase": "लाल किला", 18 | "Opening": "28 May 2017", 19 | "Interchange\nConnection": "Feeder Bus" 20 | }, 21 | { 22 | "English": "7", 23 | "Hindi": "Jama Masjid", 24 | "Phase": "जामा मस्जिद" 25 | }, 26 | { 27 | "English": "8", 28 | "Hindi": "Delhi Gate", 29 | "Phase": "दिल्ली गेट" 30 | }, 31 | { 32 | "English": "9", 33 | "Hindi": "ITO", 34 | "Phase": "आईटीओ", 35 | "Opening": "8 June 2015", 36 | "Interchange\nConnection": "Indian Railways   Feeder Bus" 37 | }, 38 | { 39 | "10": "None", 40 | "English": "10", 41 | "Hindi": "Mandi House", 42 | "Phase": "मंडी हाउस", 43 | "Opening": "2", 44 | "Interchange\nConnection": "26 June 2014", 45 | "Station Layout": "Blue Line   Indian Railways   Feeder Bus", 46 | "Platform Level Type": "Underground", 47 | "Depot Connection": "Island", 48 | "Depot Layout": "None" 49 | }, 50 | { 51 | "English": "11", 52 | "Hindi": "Janpath", 53 | "Phase": "जनपथ", 54 | "Opening": "Feeder Bus" 55 | }, 56 | { 57 | "10": "None", 58 | "English": "12", 59 | "Hindi": "Central Secretariat", 60 | "Phase": "केंद्रीय सचिवालय", 61 | "Opening": "1", 62 | "Interchange\nConnection": "3 October 2010", 63 | "Station Layout": "Yellow Line   Feeder Bus", 64 | "Platform Level Type": "Underground", 65 | "Depot Connection": "Side", 66 | "Depot Layout": "None" 67 | }, 68 | { 69 | "English": "13", 70 | "Hindi": "Khan Market", 71 | "Phase": "खान बाजार", 72 | "Opening": "Feeder Bus", 73 | "Interchange\nConnection": "Island" 74 | }, 75 | { 76 | "English": "14", 77 | "Hindi": "Jawaharlal Nehru Stadium", 78 | "Phase": "जवाहर लाल नेहरू स्टेडियम", 79 | "Opening": "Bus Terminal" 80 | }, 81 | { 82 | "English": "15", 83 | "Hindi": "Jangpura", 84 | "Phase": "जंगपुरा", 85 | "Opening": "Indian Railways   Feeder Bus" 86 | }, 87 | { 88 | "English": "16", 89 | "Hindi": "Lajpat Nagar", 90 | "Phase": "लाजपत नगर", 91 | "Opening": "Pink Line   Bus Terminal", 92 | "Interchange\nConnection": "Elevated", 93 | "Station Layout": "Side" 94 | }, 95 | { 96 | "English": "17", 97 | "Hindi": "Moolchand", 98 | "Phase": "मूलचंद", 99 | "Opening": "Feeder Bus" 100 | }, 101 | { 102 | "English": "18", 103 | "Hindi": "Kailash Colony", 104 | "Phase": "कैलाश कॉलोनी", 105 | "Opening": "Feeder Bus" 106 | }, 107 | { 108 | "English": "19", 109 | "Hindi": "Nehru Place", 110 | "Phase": "नेहरू प्लेस", 111 | "Opening": "Bus Terminal" 112 | }, 113 | { 114 | "English": "20", 115 | "Hindi": "Kalkaji Mandir", 116 | "Phase": "कालकाजी मंदिर", 117 | "Opening": "Magenta Line   Bus Terminal" 118 | }, 119 | { 120 | "English": "21", 121 | "Hindi": "Govind Puri", 122 | "Phase": "गोविंद पुरी", 123 | "Opening": "Feeder Bus" 124 | }, 125 | { 126 | "English": "22", 127 | "Hindi": "Harkesh Nagar", 128 | "Phase": "हरकेश नगर", 129 | "Opening": "Indian Railways" 130 | }, 131 | { 132 | "English": "23", 133 | "Hindi": "Jasola Apollo", 134 | "Phase": "जसोला अपोलो", 135 | "Opening": "Feeder Bus" 136 | }, 137 | { 138 | "English": "24", 139 | "Hindi": "Sarita Vihar", 140 | "Phase": "सरिता विहार", 141 | "Opening": "Feeder Bus", 142 | "Interchange\nConnection": "Sarita Vihar Depot", 143 | "Station Layout": "At Grade" 144 | }, 145 | { 146 | "10": "None", 147 | "English": "25", 148 | "Hindi": "Mohan Estate", 149 | "Phase": "मोहन एस्टेट", 150 | "Opening": "2", 151 | "Interchange\nConnection": "14 January 2011", 152 | "Station Layout": "Feeder Bus", 153 | "Platform Level Type": "Elevated", 154 | "Depot Connection": "Side", 155 | "Depot Layout": "None" 156 | }, 157 | { 158 | "English": "26", 159 | "Hindi": "Tughlakabad", 160 | "Phase": "तुगलकाबाद", 161 | "Opening": "Indian Railways   Bus Terminal" 162 | }, 163 | { 164 | "English": "27", 165 | "Hindi": "Badarpur", 166 | "Phase": "बदरपुर", 167 | "Opening": "Bus Terminal" 168 | }, 169 | { 170 | "English": "28", 171 | "Hindi": "Sarai", 172 | "Phase": "सराय", 173 | "Opening": "3", 174 | "Interchange\nConnection": "6 September 2015", 175 | "Station Layout": "Feeder Bus", 176 | "Platform Level Type": "Elevated", 177 | "Depot Connection": "Side" 178 | }, 179 | { 180 | "English": "29", 181 | "Hindi": "NHPC Chowk", 182 | "Phase": "एनएचपीसी चौक", 183 | "Opening": "Feeder Bus" 184 | }, 185 | { 186 | "English": "30", 187 | "Hindi": "Mewala Maharajpur", 188 | "Phase": "मेवला महाराजपुर", 189 | "Opening": "Feeder Bus" 190 | }, 191 | { 192 | "English": "31", 193 | "Hindi": "Sector 28", 194 | "Phase": "सेक्टर 28", 195 | "Opening": "Feeder Bus" 196 | }, 197 | { 198 | "English": "32", 199 | "Hindi": "Badkhal Mor", 200 | "Phase": "बदखल मोर", 201 | "Opening": "Feeder Bus" 202 | }, 203 | { 204 | "English": "33", 205 | "Hindi": "Faridabad Old", 206 | "Phase": "फरीदाबाद ओल्ड", 207 | "Opening": "Indian Railways   Bus Terminal" 208 | }, 209 | { 210 | "English": "34", 211 | "Hindi": "Neelam Chowk Ajronda", 212 | "Phase": "नीलम चौक अज्रोंडा", 213 | "Opening": "Feeder Bus", 214 | "Interchange\nConnection": "Neelam Chowk Ajronda Depot", 215 | "Station Layout": "At Grade" 216 | }, 217 | { 218 | "English": "35", 219 | "Hindi": "Bata Chowk", 220 | "Phase": "बाटा चौक", 221 | "Opening": "Feeder Bus", 222 | "Interchange\nConnection": "None", 223 | "Station Layout": "None" 224 | }, 225 | { 226 | "English": "36", 227 | "Hindi": "Escorts Mujesar", 228 | "Phase": "एस्कॉर्ट्स मुजेसर", 229 | "Opening": "Indian Railways   Feeder Bus" 230 | }, 231 | { 232 | "English": "37", 233 | "Hindi": "Sant Surdas", 234 | "Phase": "संत सूरदास - सिही (एनसीबी कॉलोनी - गुड ईयर)", 235 | "Opening": "19 November 2018", 236 | "Interchange\nConnection": "Feeder Bus" 237 | }, 238 | { 239 | "English": "38", 240 | "Hindi": "Raja Nahar Singh", 241 | "Phase": "राजा नाहर सिंह (बल्लभगढ़)", 242 | "Opening": "Indian Railways   Bus Terminal" 243 | } 244 | ] -------------------------------------------------------------------------------- /functions/functions/lines/yellow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "English": "6", 4 | "Hindi": "Samaypur Badli", 5 | "Phase": "समयपुर बादली", 6 | "Opening": "10 November 2015", 7 | "Interchange\nConnection": "Indian Railways   Bus Terminal", 8 | "Station Layout": "Elevated", 9 | "Depot Connection": "None", 10 | "Depot Layout": "None" 11 | }, 12 | { 13 | "English": "7", 14 | "Hindi": "Rohini Sector 18", 15 | "Phase": "रोहिणी सेक्टर 18, 19", 16 | "Opening": "Feeder Bus" 17 | }, 18 | { 19 | "English": "8", 20 | "Hindi": "Haiderpur", 21 | "Phase": "हैदरपुर बादली मोड़" 22 | }, 23 | { 24 | "9": "None", 25 | "English": "9", 26 | "Hindi": "Jahangirpuri", 27 | "Phase": "जहाँगीरपुरी", 28 | "Opening": "2", 29 | "Interchange\nConnection": "4 February 2009", 30 | "Station Layout": "Bus Terminal", 31 | "Depot Connection": "Elevated", 32 | "Depot Layout": "None" 33 | }, 34 | { 35 | "English": "10", 36 | "Hindi": "Adarsh Nagar", 37 | "Phase": "आदर्श नगर", 38 | "Opening": "Indian Railways   Feeder Bus" 39 | }, 40 | { 41 | "English": "11", 42 | "Hindi": "Azadpur", 43 | "Phase": "आज़ादपुर", 44 | "Opening": "Pink Line   Indian Railways \n Bus Terminal" 45 | }, 46 | { 47 | "English": "12", 48 | "Hindi": "Model Town", 49 | "Phase": "मॉडल टाउन", 50 | "Opening": "Feeder Bus" 51 | }, 52 | { 53 | "English": "13", 54 | "Hindi": "GTB Nagar", 55 | "Phase": "गुरु तेग बहादुर नगर", 56 | "Opening": "Underground" 57 | }, 58 | { 59 | "9": "At Grade", 60 | "English": "14", 61 | "Hindi": "Vishwa Vidyalaya", 62 | "Phase": "विश्व विद्यालय", 63 | "Opening": "1", 64 | "Interchange\nConnection": "20 December 2004", 65 | "Station Layout": "Feeder Bus", 66 | "Depot Connection": "Underground", 67 | "Depot Layout": "Vishwa Vidyalaya\nKhyber Pass Depot" 68 | }, 69 | { 70 | "English": "15", 71 | "Hindi": "Vidhan Sabha", 72 | "Phase": "विधान सभा", 73 | "Opening": "None", 74 | "Interchange\nConnection": "None" 75 | }, 76 | { 77 | "English": "16", 78 | "Hindi": "Civil Lines", 79 | "Phase": "सिविल लाइन्स" 80 | }, 81 | { 82 | "English": "17", 83 | "Hindi": "Kashmere Gate", 84 | "Phase": "कश्मीरी गेट", 85 | "Opening": "Red Line   Violet Line   ISBT" 86 | }, 87 | { 88 | "English": "18", 89 | "Hindi": "Chandni Chowk", 90 | "Phase": "चाँदनी चौक", 91 | "Opening": "3 July 2005", 92 | "Interchange\nConnection": "Indian Railways" 93 | }, 94 | { 95 | "English": "19", 96 | "Hindi": "Chawri Bazar", 97 | "Phase": "चावड़ी बाजार", 98 | "Opening": "None" 99 | }, 100 | { 101 | "English": "20", 102 | "Hindi": "New Delhi", 103 | "Phase": "नई दिल्ली", 104 | "Opening": "Orange Line   Indian Railways \n Bus Terminal" 105 | }, 106 | { 107 | "English": "21", 108 | "Hindi": "Rajiv Chowk", 109 | "Phase": "राजीव चौक", 110 | "Opening": "Blue Line   Bus Terminal" 111 | }, 112 | { 113 | "English": "22", 114 | "Hindi": "Patel Chowk", 115 | "Phase": "पटेल चौक", 116 | "Opening": "Feeder Bus" 117 | }, 118 | { 119 | "English": "23", 120 | "Hindi": "Central Secretariat", 121 | "Phase": "केन्द्रीय सचिवालय", 122 | "Opening": "Violet Line   Bus Terminal" 123 | }, 124 | { 125 | "9": "None", 126 | "English": "24", 127 | "Hindi": "Udyog Bhawan", 128 | "Phase": "उद्योग भवन", 129 | "Opening": "2", 130 | "Interchange\nConnection": "3 September 2010", 131 | "Station Layout": "Feeder Bus", 132 | "Depot Connection": "Underground", 133 | "Depot Layout": "None" 134 | }, 135 | { 136 | "English": "25", 137 | "Hindi": "Lok Kalyan Marg", 138 | "Phase": "लोक कल्याण मार्ग" 139 | }, 140 | { 141 | "English": "26", 142 | "Hindi": "Jor Bagh", 143 | "Phase": "जोर बाग़" 144 | }, 145 | { 146 | "English": "27", 147 | "Hindi": "INA", 148 | "Phase": "आई.एन.ए", 149 | "Opening": "Pink Line   Feeder Bus" 150 | }, 151 | { 152 | "English": "28", 153 | "Hindi": "AIIMS", 154 | "Phase": "एम्स", 155 | "Opening": "Feeder Bus" 156 | }, 157 | { 158 | "English": "29", 159 | "Hindi": "Green Park", 160 | "Phase": "ग्रीन पार्क" 161 | }, 162 | { 163 | "English": "30", 164 | "Hindi": "Hauz Khas", 165 | "Phase": "हौज़ खास", 166 | "Opening": "Magenta Line   Feeder Bus" 167 | }, 168 | { 169 | "English": "31", 170 | "Hindi": "Malviya Nagar", 171 | "Phase": "मालवीय नगर", 172 | "Opening": "Feeder Bus" 173 | }, 174 | { 175 | "English": "32", 176 | "Hindi": "Saket", 177 | "Phase": "साकेत" 178 | }, 179 | { 180 | "English": "33", 181 | "Hindi": "Qutub Minar", 182 | "Phase": "क़ुतुब मीनार", 183 | "Opening": "21 June 2010", 184 | "Interchange\nConnection": "Bus Terminal", 185 | "Station Layout": "Elevated" 186 | }, 187 | { 188 | "English": "34", 189 | "Hindi": "Chhatarpur", 190 | "Phase": "छत्तरपुर", 191 | "Opening": "26 August 2010" 192 | }, 193 | { 194 | "English": "35", 195 | "Hindi": "Sultanpur", 196 | "Phase": "सुल्तानपुर", 197 | "Opening": "21 June 2010", 198 | "Interchange\nConnection": "Sultanpur Depot", 199 | "Station Layout": "At Grade" 200 | }, 201 | { 202 | "English": "36", 203 | "Hindi": "Ghitorni", 204 | "Phase": "घिटोरनी", 205 | "Opening": "Feeder Bus", 206 | "Interchange\nConnection": "None", 207 | "Station Layout": "None" 208 | }, 209 | { 210 | "English": "37", 211 | "Hindi": "Arjan Garh", 212 | "Phase": "अर्जन गढ़" 213 | }, 214 | { 215 | "English": "38", 216 | "Hindi": "Guru Dronacharya", 217 | "Phase": "गुरु द्रोणाचार्य" 218 | }, 219 | { 220 | "English": "39", 221 | "Hindi": "Sikandarpur", 222 | "Phase": "सिकन्दरपुर", 223 | "Opening": "Rapid Metro Gurgaon   Feeder Bus" 224 | }, 225 | { 226 | "English": "40", 227 | "Hindi": "MG Road", 228 | "Phase": "एम जी रोड", 229 | "Opening": "Feeder Bus" 230 | }, 231 | { 232 | "English": "41", 233 | "Hindi": "IFFCO Chowk", 234 | "Phase": "इफ़्को चौक" 235 | }, 236 | { 237 | "English": "42", 238 | "Hindi": "HUDA City Centre", 239 | "Phase": "हुडा सिटी सैंटर", 240 | "Opening": "Bus Terminal" 241 | } 242 | ] -------------------------------------------------------------------------------- /functions/functions/route copy.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | const functions = require('firebase-functions'); 4 | 5 | //QUEUE CLASS 6 | class PriorityQueue { 7 | constructor() { 8 | this.collection = []; 9 | } 10 | enqueue(element) { 11 | if (this.isEmpty()) { 12 | this.collection.push(element); 13 | } else { 14 | let added = false; 15 | for (let i = 1; i <= this.collection.length; i++) { 16 | if (element[1] < this.collection[i - 1][1]) { 17 | this.collection.splice(i - 1, 0, element); 18 | added = true; 19 | break; 20 | } 21 | } 22 | if (!added) { 23 | this.collection.push(element); 24 | } 25 | } 26 | }; 27 | dequeue() { 28 | let value = this.collection.shift(); 29 | return value; 30 | }; 31 | isEmpty() { 32 | return (this.collection.length === 0) 33 | }; 34 | } 35 | 36 | //GRAPH CLASS 37 | class Graph { 38 | constructor() { 39 | this.nodes = []; 40 | this.adjacencyList = {}; 41 | } 42 | 43 | addNode(node) { 44 | this.nodes.push(node); 45 | this.adjacencyList[node] = []; 46 | } 47 | 48 | addEdge(node1, node2, weight, color) { 49 | this.adjacencyList[node1].push({ node: node2, weight: weight, line: color }); 50 | this.adjacencyList[node2].push({ node: node1, weight: weight, line: color }); 51 | } 52 | 53 | addEdgeSingle(node1, node2, weight, color) { 54 | this.adjacencyList[node1].push({ node: node2, weight: weight, line: color }); 55 | } 56 | 57 | //Djikstra 58 | shortestRoute(startNode, endNode) { 59 | console.log("--Directions from " + startNode + " to " + endNode + "--\n"); 60 | let times = {}; 61 | var change = []; 62 | let backtrace = {}; 63 | let pq = new PriorityQueue(); 64 | times[startNode] = 0; 65 | this.nodes.forEach(node => { 66 | if (node !== startNode) { 67 | times[node] = Infinity 68 | } 69 | }); 70 | pq.enqueue([startNode, 0]); 71 | while (!pq.isEmpty()) { 72 | let shortestStep = pq.dequeue(); 73 | let currentNode = shortestStep[0]; 74 | this.adjacencyList[currentNode].forEach(neighbor => { 75 | let time = times[currentNode] + neighbor.weight; 76 | if (currentNode != startNode) { 77 | if (this.getline(currentNode, neighbor.node) != this.getline(currentNode, backtrace[currentNode])) { 78 | //Yamuna Bank Handler 79 | if (currentNode == 'Yamuna Bank' && neighbor.node == 'Indraprastha' && backtrace[currentNode] == 'Laxmi Nagar') { 80 | time = time + 0; 81 | } 82 | else if (currentNode == 'Yamuna Bank' && neighbor.node == 'Laxmi Nagar' && backtrace[currentNode] == 'Indraprastha') { 83 | time = time + 0; 84 | } 85 | //Dhaula Kuan - Durgabai Deshmukh South Campus Handler 86 | else if (this.getline(currentNode, neighbor.node) == "1.2km Skywalk" || this.getline(currentNode, backtrace[currentNode]) == "1.2km Skywalk") 87 | time = time + 0; 88 | //Noida Sector 51 - Noida Sector 52 Handler 89 | else if (this.getline(currentNode, neighbor.node) == "300m Walkway/Free e-Rickshaw" || this.getline(currentNode, backtrace[currentNode]) == "300m Walkway/Free e-Rickshaw") 90 | time = time + 0; 91 | //Ashok Park Main handler 92 | else if (currentNode == 'Ashok Park Main' && neighbor.node == 'Punjabi Bagh' && backtrace[currentNode] == 'Satguru Ram Singh Marg') { 93 | time = time + 0; 94 | } 95 | else if (currentNode == 'Ashok Park Main' && neighbor.node == 'Satguru Ram Singh Marg' && backtrace[currentNode] == 'Punjabi Bagh') { 96 | time = time + 0; 97 | } 98 | //Interchange Time Penalty 99 | else 100 | time = time + 9; 101 | } 102 | } 103 | 104 | if (time < times[neighbor.node]) { 105 | times[neighbor.node] = time; 106 | backtrace[neighbor.node] = currentNode; 107 | pq.enqueue([neighbor.node, time]); 108 | } 109 | }); 110 | } 111 | let path = [endNode]; 112 | let lastStep = endNode; 113 | 114 | //Class to send as result 115 | class all { 116 | constructor() { 117 | this.line1 = []; 118 | this.line2 = []; 119 | this.interchange = []; 120 | this.lineEnds = []; 121 | this.path; 122 | this.time; 123 | } 124 | } 125 | var result = new all(); 126 | 127 | while (lastStep !== startNode) { 128 | if (this.getline(lastStep, backtrace[lastStep]) != this.getline(backtrace[lastStep], backtrace[backtrace[lastStep]])) 129 | if (backtrace[lastStep] == startNode) 130 | ; 131 | //Yamuna Bank Handler 132 | else if (backtrace[lastStep] == 'Yamuna Bank' && lastStep == 'Indraprastha' && backtrace[backtrace[lastStep]] == 'Laxmi Nagar') { 133 | ; 134 | } 135 | else if (backtrace[lastStep] == 'Yamuna Bank' && lastStep == 'Laxmi Nagar' && backtrace[backtrace[lastStep]] == 'Indraprastha') { 136 | ; 137 | } 138 | //Ashok Park Main Handler 139 | else if (backtrace[lastStep] == 'Ashok Park Main' && lastStep == 'Punjabi Bagh' && backtrace[backtrace[lastStep]] == 'Satguru Ram Singh Marg') { 140 | ; 141 | } 142 | else if (backtrace[lastStep] == 'Ashok Park Main' && lastStep == 'Satguru Ram Singh Marg' && backtrace[backtrace[lastStep]] == 'Punjabi Bagh') { 143 | ; 144 | } 145 | else { 146 | var line1Send = this.getline(backtrace[lastStep], backtrace[backtrace[lastStep]]); 147 | var line2Send = this.getline(lastStep, backtrace[lastStep]); 148 | var interchangeSend = backtrace[lastStep]; 149 | result.line1.unshift(line1Send); 150 | result.line2.unshift(line2Send); 151 | result.interchange.unshift(interchangeSend); 152 | } 153 | path.unshift(backtrace[lastStep]) 154 | lastStep = backtrace[lastStep] 155 | } 156 | result.path = path; 157 | result.time = times[endNode]; 158 | 159 | if (result.interchange.length == 0) 160 | result.line1[0] = this.getline(result.path[0], result.path[1]); 161 | result.lineEnds = getLast(result.path, result.interchange, result.line1, result.line2) 162 | console.log(result.time) 163 | return result; 164 | 165 | } 166 | 167 | printGraph(sta) { 168 | console.log("--Adjacency List Of " + sta + "--") 169 | for (var i = 0; i < this.adjacencyList[sta].length; i++) 170 | console.log(this.adjacencyList[sta][i].line); 171 | } 172 | 173 | //Returns line between two adjacent stations 174 | getline(sta1, sta2) { 175 | for (var i = 0; i < this.adjacencyList[sta1].length; i++) { 176 | if (this.adjacencyList[sta1][i].node == sta2) 177 | return (this.adjacencyList[sta1][i].line); 178 | } 179 | } 180 | } 181 | 182 | //Chooses station array based on input 183 | function lineChoose(linein) { 184 | var line = [] 185 | if (linein == 'blue') 186 | line = blueline; 187 | else if (linein == 'bluebranch') 188 | line = bluebranchline; 189 | else if (linein == 'magenta') 190 | line = magentaline; 191 | else if (linein == 'yellow') 192 | line = yellowline; 193 | else if (linein == 'violet') 194 | line = violetline; 195 | else if (linein == 'red') 196 | line = redline; 197 | else if (linein == 'green') 198 | line = greenline; 199 | else if (linein == 'greenbranch') 200 | line = greenbranchline; 201 | else if (linein == 'pink') 202 | line = pinkline; 203 | else if (linein == 'pinkbranch') 204 | line = pinkbranchline; 205 | else if (linein == 'orange') 206 | line = orangeline; 207 | else if (linein == 'aqua') 208 | line = aqualine; 209 | else if (linein == 'grey') 210 | line = greyline; 211 | else if (linein == 'rapid') 212 | line = rapidline 213 | else if (linein == 'rapidloop') 214 | line = rapidloopline 215 | else 216 | line = 0; 217 | return line; 218 | } 219 | 220 | //Gets last station on line in direction of traversal 221 | function getLast(path, interchange, line1, line2) { 222 | var line 223 | var linein 224 | var out = []; 225 | linein = line1[0] 226 | 227 | //Bluebranch at Yamuna Bank Handler 228 | if (linein == 'bluebranch' && interchange[0] == 'Yamuna Bank') { 229 | out.push('Dwarka Sector 21'); 230 | } 231 | //Greenbranch at Ashok Park Main Handler 232 | else if (linein == 'greenbranch' && interchange[0] == 'Ashok Park Main') { 233 | out.push('Brigadier Hoshiyar Singh'); 234 | } 235 | 236 | else { 237 | line = lineChoose(linein) 238 | out.push(getLastCalcStart(line, path, interchange)); 239 | } 240 | if (line2.length == 0) 241 | return out 242 | for (var i = 0; i < (line2.length); i++) { 243 | linein = line2[i] 244 | 245 | line = lineChoose(linein) 246 | out.push(getLastCalc(line, path, interchange[i], interchange[i + 1])) 247 | } 248 | return out 249 | } 250 | 251 | //Last station calculator first line 252 | function getLastCalcStart(line, path, interchange) { 253 | var startPos = 1000 254 | var endPos = 1000 255 | if (line == 0) 256 | return 0 257 | for (var i = 0; i <= line.length; i++) { 258 | //startpos 259 | if (line[i] == path[0]) 260 | startPos = i; 261 | //endpos 262 | if (interchange.length == 0) { 263 | if (line[i] == path[path.length - 1]) 264 | endPos = i 265 | } 266 | else if (line[i] == interchange[0]) 267 | endPos = i; 268 | } 269 | return comparePos(startPos, endPos, line) 270 | } 271 | 272 | //Last station calculator for all lines except first 273 | function getLastCalc(line, path, interchange, nextInterchange) { 274 | var startPos = 1000 275 | var endPos = 1000 276 | if (line == 0) 277 | return 0 278 | for (var j = 0; j <= line.length; j++) { 279 | //startpos 280 | if (line[j] == interchange) 281 | startPos = j; 282 | //endpos 283 | if (nextInterchange == undefined) { 284 | if (line[j] == path[path.length - 1]) 285 | endPos = j; 286 | } 287 | else if (line[j] == nextInterchange) { 288 | endPos = j; 289 | } 290 | } 291 | return comparePos(startPos, endPos, line) 292 | } 293 | 294 | //Returns station based on comparisons 295 | function comparePos(startPos, endPos, line) { 296 | //Out of line start handler 297 | if (startPos == 1000) { 298 | if (line == blueline) 299 | return 'Dwarka Sector 21' 300 | else if (line == bluebranchline) 301 | return 'Vaishali' 302 | else if (line == greenline) 303 | return 'Brigadier Hoshiyar Singh' 304 | else if (line == greenbranchline) 305 | return 'Kirti Nagar' 306 | } 307 | //Out of line end handler 308 | if (endPos == 1000) { 309 | if (line == blueline) 310 | return 'Vaishali'; 311 | else if (line == bluebranchline) 312 | return 'Dwarka Sector 21' 313 | else if (line == greenline) 314 | return 'Kirti Nagar' 315 | else if (line == greenbranchline) 316 | return 'Brigadier Hoshiyar Singh' 317 | } 318 | if (endPos < startPos) { 319 | if(line == bluebranchline) 320 | return 'Dwarka Sector 21' 321 | if(line == greenbranchline) 322 | return 'Brigadier Hoshiyar Singh' 323 | return line[0] 324 | } 325 | else 326 | return line[line.length - 1]; 327 | 328 | } 329 | 330 | 331 | //Declare metro line arrays globally 332 | var blueline = []; 333 | var bluebranchline = []; 334 | var magentaline = []; 335 | var yellowline = []; 336 | var violetline = []; 337 | var redline = []; 338 | var greenline = []; 339 | var greenbranchline = []; 340 | var pinkline = []; 341 | var pinkbranchline = []; 342 | var orangeline = []; 343 | var aqualine = []; 344 | var greyline = []; 345 | var rapidline = []; 346 | var rapidloopline = []; 347 | 348 | //Imports station details from JSON to line arrays 349 | function importlines() { 350 | // 351 | //METRO LINES 352 | // 353 | 354 | 355 | 356 | //Blue Line 357 | 358 | blue = require("./lines/blue.json"); 359 | 360 | for (var i = 0; i < blue.length; i++) { 361 | blueline[i] = blue[i]["Hindi"]; 362 | } 363 | 364 | for (var i = 0; i < blueline.length; i++) { 365 | g.addNode(blueline[i]); 366 | } 367 | 368 | for (var i = 0; i < (blueline.length - 1); i++) { 369 | g.addEdge(blueline[i], blueline[i + 1], 2.02, "blue"); 370 | } 371 | 372 | 373 | 374 | //BlueBranch 375 | bluebranch = require("./lines/bluebranch.json"); 376 | 377 | for (var i = 0; i < bluebranch.length; i++) { 378 | 379 | bluebranchline[i] = bluebranch[i]["Hindi"]; 380 | } 381 | for (var i = 0; i < bluebranchline.length; i++) { 382 | //Skip Interchange 383 | if (bluebranchline[i] == 'Yamuna Bank') 384 | continue; 385 | else 386 | g.addNode(bluebranchline[i]); 387 | } 388 | 389 | for (var i = 0; i < (bluebranchline.length - 1); i++) { 390 | g.addEdge(bluebranchline[i], bluebranchline[i + 1], 1.875, "bluebranch"); 391 | } 392 | 393 | //Magenta 394 | magenta = require("./lines/magenta.json"); 395 | 396 | for (var i = 0; i < magenta.length; i++) { 397 | magentaline[i] = magenta[i]["25"]; 398 | } 399 | for (var i = 0; i < magentaline.length; i++) { 400 | //Skip Interchange 401 | if (magentaline[i] == 'Janakpuri West') 402 | continue; 403 | if (magentaline[i] == 'Botanical Garden') 404 | continue; 405 | else 406 | g.addNode(magentaline[i]); 407 | } 408 | for (var i = 0; i < (magentaline.length - 1); i++) { 409 | g.addEdge(magentaline[i], magentaline[i + 1], 2.36, "magenta"); 410 | } 411 | 412 | //Yellow Line 413 | yellow = require("./lines/yellow.json"); 414 | 415 | for (var i = 0; i < yellow.length; i++) { 416 | yellowline[i] = yellow[i]["Hindi"]; 417 | } 418 | for (var i = 0; i < yellowline.length; i++) { 419 | if (yellowline[i] == 'Hauz Khas' || yellowline[i] == 'Rajiv Chowk') 420 | continue; 421 | else 422 | g.addNode(yellowline[i]); 423 | } 424 | for (var i = 0; i < (yellowline.length - 1); i++) { 425 | g.addEdge(yellowline[i], yellowline[i + 1], 2.22, "yellow"); 426 | } 427 | 428 | 429 | //Violet Line 430 | violet = require("./lines/violet.json"); 431 | 432 | for (var i = 0; i < violet.length; i++) { 433 | 434 | violetline[i] = violet[i]["Hindi"]; 435 | } 436 | for (var i = 0; i < violetline.length; i++) { 437 | if (violetline[i] == 'Kashmere Gate' || violetline[i] == 'Mandi House' || violetline[i] == 'Central Secretariat' || violetline[i] == 'Kalkaji Mandir') 438 | continue; 439 | else 440 | g.addNode(violetline[i]); 441 | } 442 | for (var i = 0; i < (violetline.length - 1); i++) { 443 | g.addEdge(violetline[i], violetline[i + 1], 2.24, "violet"); 444 | } 445 | 446 | 447 | 448 | //red Line 449 | red = require("./lines/red.json"); 450 | 451 | for (var i = 0; i < red.length; i++) { 452 | 453 | redline[i] = red[i]["Hindi"]; 454 | } 455 | for (var i = 0; i < redline.length; i++) { 456 | if (redline[i] == 'Kashmere Gate') 457 | continue; 458 | else 459 | g.addNode(redline[i]); 460 | } 461 | for (var i = 0; i < (redline.length - 1); i++) { 462 | g.addEdge(redline[i], redline[i + 1], 2.03, "red"); 463 | } 464 | 465 | 466 | 467 | //green Line 468 | green = require("./lines/green.json"); 469 | 470 | for (var i = 0; i < green.length; i++) { 471 | greenline[i] = green[i]["Hindi"]; 472 | } 473 | for (var i = 0; i < greenline.length; i++) { 474 | if (greenline[i] == 'Inderlok') 475 | continue; 476 | else 477 | g.addNode(greenline[i]); 478 | } 479 | for (var i = 0; i < (greenline.length - 1); i++) { 480 | g.addEdge(greenline[i], greenline[i + 1], 2.49, "green"); 481 | } 482 | 483 | 484 | //greenbranch Line 485 | greenbranch = require("./lines/greenbranch.json"); 486 | 487 | for (var i = 0; i < greenbranch.length; i++) { 488 | greenbranchline[i] = greenbranch[i]["Hindi"]; 489 | } 490 | for (var i = 0; i < greenbranchline.length; i++) { 491 | if (greenbranchline[i] == 'Kirti Nagar' || greenbranchline[i] == 'Ashok Park Main') 492 | continue; 493 | else 494 | g.addNode(greenbranchline[i]); 495 | } 496 | for (var i = 0; i < (greenbranchline.length - 1); i++) { 497 | g.addEdge(greenbranchline[i], greenbranchline[i + 1], 1.33, "greenbranch"); 498 | } 499 | 500 | //pink Line 501 | pink = require("./lines/pink.json"); 502 | 503 | for (var i = 0; i < pink.length; i++) { 504 | pinkline[i] = pink[i]["Hindi"]; 505 | } 506 | for (var i = 0; i < pinkline.length; i++) { 507 | if (pinkline[i] == 'Azadpur' || pinkline[i] == 'Netaji Subhash Place' || pinkline[i] == 'Rajouri Garden' || pinkline[i] == 'INA' || pinkline[i] == 'Lajpat Nagar' || pinkline[i] == 'Mayur Vihar – I') 508 | continue; 509 | else 510 | g.addNode(pinkline[i]); 511 | } 512 | for (var i = 0; i < (pinkline.length - 1); i++) { 513 | g.addEdge(pinkline[i], pinkline[i + 1], 2.69, "pink"); 514 | } 515 | 516 | //pinkbranch Line 517 | pinkbranch = require("./lines/pinkbranch.json"); 518 | 519 | for (var i = 0; i < pinkbranch.length; i++) { 520 | pinkbranchline[i] = pinkbranch[i]["Hindi"]; 521 | } 522 | for (var i = 0; i < pinkbranchline.length; i++) { 523 | if (pinkbranchline[i] == 'Anand Vihar' || pinkbranchline[i] == 'Karkarduma' || pinkbranchline[i] == 'Welcome') 524 | continue; 525 | else 526 | g.addNode(pinkbranchline[i]); 527 | } 528 | for (var i = 0; i < (pinkbranchline.length - 1); i++) { 529 | g.addEdge(pinkbranchline[i], pinkbranchline[i + 1], 2.43, "pinkbranch"); 530 | } 531 | 532 | //Orange 533 | orange = require("./lines/orange.json"); 534 | 535 | for (var i = 0; i < orange.length; i++) { 536 | orangeline[i] = orange[i]["Hindi"]; 537 | } 538 | for (var i = 0; i < orangeline.length; i++) { 539 | if (orangeline[i] == 'New Delhi' || orangeline[i] == 'Dwarka Sector 21') 540 | continue; 541 | else 542 | g.addNode(orangeline[i]); 543 | } 544 | for (var i = 0; i < (orangeline.length - 1); i++) { 545 | g.addEdge(orangeline[i], orangeline[i + 1], 5.2, "orange"); 546 | } 547 | 548 | 549 | 550 | 551 | 552 | 553 | //Aqua Line 554 | 555 | aqua = require("./lines/aqua.json"); 556 | 557 | for (var i = 0; i < aqua.length; i++) { 558 | aqualine[i] = aqua[i]["Hindi"]; 559 | } 560 | 561 | for (var i = 0; i < aqualine.length; i++) { 562 | g.addNode(aqualine[i]); 563 | } 564 | 565 | for (var i = 0; i < (aqualine.length - 1); i++) { 566 | g.addEdge(aqualine[i], aqualine[i + 1], 2.86, "aqua"); 567 | } 568 | 569 | 570 | 571 | //Grey Line 572 | 573 | grey = require("./lines/grey.json"); 574 | 575 | for (var i = 0; i < grey.length; i++) { 576 | greyline[i] = grey[i]["2"]; 577 | } 578 | 579 | 580 | for (var i = 0; i < greyline.length; i++) { 581 | if (greyline[i] == 'Dwarka') 582 | continue; 583 | else 584 | g.addNode(greyline[i]); 585 | } 586 | 587 | for (var i = 0; i < (greyline.length - 1); i++) { 588 | g.addEdge(greyline[i], greyline[i + 1], 2.10, "grey"); 589 | } 590 | 591 | //rapid 592 | rapid = require("./lines/rapid.json"); 593 | 594 | for (var i = 0; i < rapid.length; i++) { 595 | rapidline[i] = rapid[i]["Hindi"]; 596 | } 597 | for (var i = 0; i < rapidline.length; i++) { 598 | if (rapidline[i] == 'Sikandarpur') 599 | continue; 600 | else 601 | g.addNode(rapidline[i]); 602 | } 603 | for (var i = 0; i < (rapidline.length - 1); i++) { 604 | g.addEdge(rapidline[i], rapidline[i + 1], 5.2, "rapid"); 605 | } 606 | 607 | //rapidloop 608 | rapidloop = require("./lines/rapidloop.json"); 609 | for (var i = 0; i < rapidloop.length; i++) { 610 | rapidloopline[i] = rapidloop[i]["Hindi"]; 611 | } 612 | for (var i = 0; i < rapidloopline.length; i++) { 613 | g.addNode(rapidloopline[i]); 614 | } 615 | 616 | for (var i = 0; i < (rapidloopline.length - 1); i++) { 617 | g.addEdgeSingle(rapidloopline[i], rapidloopline[i + 1], 5.2, "rapidloop"); 618 | } 619 | 620 | 621 | //Dhaula Kuan - South Campus Connection 622 | g.addEdge("Dhaula Kuan", "Durgabai Deshmukh South Campus", 18, "1.2km Skywalk"); 623 | 624 | //Noida Sec 52 - Noida Sec 51 625 | g.addEdge("Noida Sector 52", "Noida Sector 51", 12, "300m Walkway/Free e-Rickshaw"); 626 | 627 | //Aqua Line Looper 628 | g.addEdgeSingle("Phase 2", "Vodafone Belvedere Towers", 5.2, "rapidloop"); 629 | g.addEdgeSingle("Phase 3", "Phase 2", 5.2, "rapidloop"); 630 | 631 | 632 | } 633 | 634 | 635 | //Create new graph 636 | let g = new Graph(); 637 | //Import lines 638 | importlines(); 639 | 640 | 641 | //Firebase function exporter 642 | exports.get = functions.https.onRequest((req, res) => { 643 | let to = req.query.to 644 | let from = req.query.from 645 | result = g.shortestRoute(from, to); 646 | res.send(result) 647 | }) 648 | 649 | 650 | 651 | 652 | //ShortestRouteCall 653 | //console.log(g.shortestRoute("Palam", "Model Town").interchange); 654 | 655 | //AdjList of Station 656 | //g.printGraph("Rajouri Garden"); 657 | 658 | //Order of Lining: 659 | //Blue 660 | //BlueBranch 661 | //Magenta 662 | //Yellow 663 | //Violet 664 | //Red 665 | //Green 666 | //Green Branch 667 | //Pink 668 | //Pink Branch 669 | //Orange 670 | //Aqua 671 | //Grey -------------------------------------------------------------------------------- /functions/functions/route.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | const functions = require('firebase-functions'); 4 | 5 | //QUEUE CLASS 6 | class PriorityQueue { 7 | constructor() { 8 | this.collection = []; 9 | } 10 | enqueue(element) { 11 | if (this.isEmpty()) { 12 | this.collection.push(element); 13 | } else { 14 | let added = false; 15 | for (let i = 1; i <= this.collection.length; i++) { 16 | if (element[1] < this.collection[i - 1][1]) { 17 | this.collection.splice(i - 1, 0, element); 18 | added = true; 19 | break; 20 | } 21 | } 22 | if (!added) { 23 | this.collection.push(element); 24 | } 25 | } 26 | }; 27 | dequeue() { 28 | let value = this.collection.shift(); 29 | return value; 30 | }; 31 | isEmpty() { 32 | return (this.collection.length === 0) 33 | }; 34 | } 35 | 36 | //GRAPH CLASS 37 | class Graph { 38 | constructor() { 39 | this.nodes = []; 40 | this.adjacencyList = {}; 41 | } 42 | 43 | addNode(node) { 44 | this.nodes.push(node); 45 | this.adjacencyList[node] = []; 46 | } 47 | 48 | addEdge(node1, node2, weight, color) { 49 | this.adjacencyList[node1].push({ node: node2, weight: weight, line: color }); 50 | this.adjacencyList[node2].push({ node: node1, weight: weight, line: color }); 51 | } 52 | 53 | addEdgeSingle(node1, node2, weight, color) { 54 | this.adjacencyList[node1].push({ node: node2, weight: weight, line: color }); 55 | } 56 | 57 | //Djikstra 58 | shortestRoute(startNode, endNode) { 59 | console.log("--Directions from " + startNode + " to " + endNode + "--\n"); 60 | let times = {}; 61 | var change = []; 62 | let backtrace = {}; 63 | var foundS =0, foundD =0 ; 64 | let pq = new PriorityQueue(); 65 | times[startNode] = 0; 66 | this.nodes.forEach(node => { 67 | if(node==startNode) { 68 | foundS=1 69 | } 70 | if(node==endNode) { 71 | foundD =1 72 | } 73 | if (node !== startNode) { 74 | times[node] = Infinity 75 | } 76 | }); 77 | if(foundS == 0 && foundD ==0) 78 | return {'status' : 406} 79 | else if(foundS == 0){ 80 | return {'status' : 4061} 81 | } 82 | else if(foundD == 0){ 83 | return {'status' : 4062} 84 | } 85 | pq.enqueue([startNode, 0]); 86 | while (!pq.isEmpty()) { 87 | let shortestStep = pq.dequeue(); 88 | let currentNode = shortestStep[0]; 89 | this.adjacencyList[currentNode].forEach(neighbor => { 90 | let time = times[currentNode] + neighbor.weight; 91 | if (currentNode != startNode) { 92 | if (this.getline(currentNode, neighbor.node) != this.getline(currentNode, backtrace[currentNode])) { 93 | //Yamuna Bank Handler 94 | if (currentNode == 'Yamuna Bank' && neighbor.node == 'Indraprastha' && backtrace[currentNode] == 'Laxmi Nagar') { 95 | time = time + 0; 96 | } 97 | else if (currentNode == 'Yamuna Bank' && neighbor.node == 'Laxmi Nagar' && backtrace[currentNode] == 'Indraprastha') { 98 | time = time + 0; 99 | } 100 | //Dhaula Kuan - Durgabai Deshmukh South Campus Handler 101 | else if (this.getline(currentNode, neighbor.node) == "1.2km Skywalk" || this.getline(currentNode, backtrace[currentNode]) == "1.2km Skywalk") 102 | time = time + 0; 103 | //Noida Sector 51 - Noida Sector 52 Handler 104 | else if (this.getline(currentNode, neighbor.node) == "300m Walkway/Free e-Rickshaw" || this.getline(currentNode, backtrace[currentNode]) == "300m Walkway/Free e-Rickshaw") 105 | time = time + 0; 106 | //Ashok Park Main handler 107 | else if (currentNode == 'Ashok Park Main' && neighbor.node == 'Punjabi Bagh' && backtrace[currentNode] == 'Satguru Ram Singh Marg') { 108 | time = time + 0; 109 | } 110 | else if (currentNode == 'Ashok Park Main' && neighbor.node == 'Satguru Ram Singh Marg' && backtrace[currentNode] == 'Punjabi Bagh') { 111 | time = time + 0; 112 | } 113 | //Interchange Time Penalty 114 | else 115 | time = time + 9; 116 | } 117 | } 118 | 119 | if (time < times[neighbor.node]) { 120 | times[neighbor.node] = time; 121 | backtrace[neighbor.node] = currentNode; 122 | pq.enqueue([neighbor.node, time]); 123 | } 124 | }); 125 | } 126 | let path = [endNode]; 127 | let lastStep = endNode; 128 | 129 | //Class to send as result 130 | class all { 131 | constructor() { 132 | this.status = 204; 133 | this.line1 = []; 134 | this.line2 = []; 135 | this.interchange = []; 136 | this.lineEnds = []; 137 | this.path; 138 | this.time; 139 | } 140 | } 141 | var result = new all(); 142 | while (lastStep !== startNode) { 143 | if (this.getline(lastStep, backtrace[lastStep]) != this.getline(backtrace[lastStep], backtrace[backtrace[lastStep]])) 144 | if (backtrace[lastStep] == startNode) 145 | ; 146 | //Yamuna Bank Handler 147 | else if (backtrace[lastStep] == 'Yamuna Bank' && lastStep == 'Indraprastha' && backtrace[backtrace[lastStep]] == 'Laxmi Nagar') { 148 | ; 149 | } 150 | else if (backtrace[lastStep] == 'Yamuna Bank' && lastStep == 'Laxmi Nagar' && backtrace[backtrace[lastStep]] == 'Indraprastha') { 151 | ; 152 | } 153 | //Ashok Park Main Handler 154 | else if (backtrace[lastStep] == 'Ashok Park Main' && lastStep == 'Punjabi Bagh' && backtrace[backtrace[lastStep]] == 'Satguru Ram Singh Marg') { 155 | ; 156 | } 157 | else if (backtrace[lastStep] == 'Ashok Park Main' && lastStep == 'Satguru Ram Singh Marg' && backtrace[backtrace[lastStep]] == 'Punjabi Bagh') { 158 | ; 159 | } 160 | else { 161 | var line1Send = this.getline(backtrace[lastStep], backtrace[backtrace[lastStep]]); 162 | var line2Send = this.getline(lastStep, backtrace[lastStep]); 163 | var interchangeSend = backtrace[lastStep]; 164 | result.line1.unshift(line1Send); 165 | result.line2.unshift(line2Send); 166 | result.interchange.unshift(interchangeSend); 167 | } 168 | path.unshift(backtrace[lastStep]) 169 | lastStep = backtrace[lastStep] 170 | } 171 | result.path = path; 172 | result.time = times[endNode]; 173 | 174 | if (result.interchange.length == 0) 175 | result.line1[0] = this.getline(result.path[0], result.path[1]); 176 | result.lineEnds = getLast(result.path, result.interchange, result.line1, result.line2) 177 | console.log(result.time) 178 | 179 | if(path.length != 1) 180 | result.status = 200 181 | return result; 182 | } 183 | 184 | printGraph(sta) { 185 | console.log("--Adjacency List Of " + sta + "--") 186 | for (var i = 0; i < this.adjacencyList[sta].length; i++) 187 | console.log(this.adjacencyList[sta][i].line); 188 | } 189 | 190 | //Returns line between two adjacent stations 191 | getline(sta1, sta2) { 192 | var a = this.adjacencyList[sta1] 193 | var b = this.adjacencyList[sta2] 194 | if( a == undefined || b == undefined) 195 | return -2 196 | for (var i = 0; i < this.adjacencyList[sta1].length; i++) { 197 | if (this.adjacencyList[sta1][i].node == sta2) 198 | return (this.adjacencyList[sta1][i].line) 199 | } 200 | for (var j = 0; j < this.adjacencyList[sta2].length; j++) { 201 | if (this.adjacencyList[sta2][j].node == sta1) 202 | return (this.adjacencyList[sta2][j].line) 203 | } 204 | return -1 205 | } 206 | } 207 | 208 | //Chooses station array based on input 209 | function lineChoose(linein) { 210 | var line = [] 211 | if (linein == 'blue') 212 | line = blueline; 213 | else if (linein == 'bluebranch') 214 | line = bluebranchline; 215 | else if (linein == 'magenta') 216 | line = magentaline; 217 | else if (linein == 'yellow') 218 | line = yellowline; 219 | else if (linein == 'violet') 220 | line = violetline; 221 | else if (linein == 'red') 222 | line = redline; 223 | else if (linein == 'green') 224 | line = greenline; 225 | else if (linein == 'greenbranch') 226 | line = greenbranchline; 227 | else if (linein == 'pink') 228 | line = pinkline; 229 | else if (linein == 'pinkbranch') 230 | line = pinkbranchline; 231 | else if (linein == 'orange') 232 | line = orangeline; 233 | else if (linein == 'aqua') 234 | line = aqualine; 235 | else if (linein == 'grey') 236 | line = greyline; 237 | else if (linein == 'rapid') 238 | line = rapidline 239 | else if (linein == 'rapidloop') 240 | line = rapidloopline 241 | else 242 | line = 0; 243 | return line; 244 | } 245 | 246 | //Gets last station on line in direction of traversal 247 | function getLast(path, interchange, line1, line2) { 248 | var line 249 | var linein 250 | var out = []; 251 | linein = line1[0] 252 | 253 | //Bluebranch at Yamuna Bank Handler 254 | if (linein == 'bluebranch' && interchange[0] == 'Yamuna Bank') { 255 | out.push('Dwarka Sector 21'); 256 | } 257 | //Greenbranch at Ashok Park Main Handler 258 | else if (linein == 'greenbranch' && interchange[0] == 'Ashok Park Main') { 259 | out.push('Brigadier Hoshiyar Singh'); 260 | } 261 | else if (linein == 'rapid') { 262 | var startLoop=1 263 | var endLoop=1 264 | 265 | for(var i=0; i { 712 | if(req.query.to == undefined || req.query.from == undefined) { 713 | res.send({'status' : '400'}) 714 | console.log("Invalid params") 715 | } 716 | else { 717 | let to = req.query.to.toLowerCase() 718 | let from = req.query.from.toLowerCase() 719 | result = g.shortestRoute(from, to); 720 | res.send(result) 721 | } 722 | }) 723 | 724 | 725 | 726 | 727 | //ShortestRouteCall 728 | //console.log(g.shortestRoute("Palam", "Model Town").interchange); 729 | 730 | //AdjList of Station 731 | //g.printGraph("Rajouri Garden"); 732 | 733 | //Order of Lining: 734 | //Blue 735 | //BlueBranch 736 | //Magenta 737 | //Yellow 738 | //Violet 739 | //Red 740 | //Green 741 | //Green Branch 742 | //Pink 743 | //Pink Branch 744 | //Orange 745 | //Aqua 746 | //Grey -------------------------------------------------------------------------------- /functions/functions/stations.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | var app = express() 3 | const functions = require('firebase-functions') 4 | 5 | 6 | 7 | //Declare metro line arrays globally 8 | var blueline = [] 9 | var bluebranchline = [] 10 | var magentaline = [] 11 | var yellowline = [] 12 | var violetline = [] 13 | var redline = [] 14 | var greenline = [] 15 | var greenbranchline = [] 16 | var pinkline = [] 17 | var pinkbranchline = [] 18 | var orangeline = [] 19 | var aqualine = [] 20 | 21 | function importlines() { 22 | // 23 | //METRO LINES 24 | // 25 | 26 | 27 | 28 | //Blue Line 29 | 30 | blue = require("./lines/blue.json"); 31 | for (var i = 0; i < blue.length; i++) { 32 | blueline[i] = blue[i]["Hindi"]; 33 | } 34 | 35 | //BlueBranch 36 | bluebranch = require("./lines/bluebranch.json"); 37 | for (var i = 0; i < bluebranch.length; i++) { 38 | bluebranchline[i] = bluebranch[i]["Hindi"]; 39 | } 40 | 41 | //Magenta 42 | magenta = require("./lines/magenta.json"); 43 | for (var i = 0; i < magenta.length; i++) { 44 | magentaline[i] = magenta[i]["25"]; 45 | } 46 | 47 | //Yellow Line 48 | yellow = require("./lines/yellow.json"); 49 | for (var i = 0; i < yellow.length; i++) { 50 | yellowline[i] = yellow[i]["Hindi"]; 51 | } 52 | 53 | 54 | //Violet Line 55 | violet = require("./lines/violet.json"); 56 | for (var i = 0; i < violet.length; i++) { 57 | violetline[i] = violet[i]["Hindi"]; 58 | } 59 | 60 | //red Line 61 | red = require("./lines/red.json"); 62 | for (var i = 0; i < red.length; i++) { 63 | redline[i] = red[i]["Hindi"]; 64 | } 65 | 66 | //green Line 67 | green = require("./lines/green.json"); 68 | 69 | for (var i = 0; i < green.length; i++) { 70 | greenline[i] = green[i]["Hindi"]; 71 | } 72 | 73 | //greenbranch Line 74 | greenbranch = require("./lines/greenbranch.json"); 75 | for (var i = 0; i < greenbranch.length; i++) { 76 | greenbranchline[i] = greenbranch[i]["Hindi"]; 77 | } 78 | 79 | //pink Line 80 | pink = require("./lines/pink.json"); 81 | for (var i = 0; i < pink.length; i++) { 82 | pinkline[i] = pink[i]["Hindi"]; 83 | } 84 | 85 | //pinkbranch Line 86 | pinkbranch = require("./lines/pinkbranch.json"); 87 | for (var i = 0; i < pinkbranch.length; i++) { 88 | pinkbranchline[i] = pinkbranch[i]["Hindi"]; 89 | } 90 | 91 | //Orange 92 | orange = require("./lines/orange.json"); 93 | for (var i = 0; i < orange.length; i++) { 94 | orangeline[i] = orange[i]["Hindi"]; 95 | } 96 | 97 | 98 | //Aqua Line 99 | aqua = require("./lines/aqua.json"); 100 | for (var i = 0; i < aqua.length; i++) { 101 | aqualine[i] = aqua[i]["Hindi"]; 102 | } 103 | 104 | } 105 | 106 | function lineChoose(linein) { 107 | var line = [] 108 | if (linein == 'blue') 109 | line = blueline; 110 | else if (linein == 'bluebranch') 111 | line = bluebranchline; 112 | else if (linein == 'magenta') 113 | line = magentaline; 114 | else if (linein == 'yellow') 115 | line = yellowline; 116 | else if (linein == 'violet') 117 | line = violetline; 118 | else if (linein == 'red') 119 | line = redline; 120 | else if (linein == 'green') 121 | line = greenline; 122 | else if (linein == 'greenbranch') 123 | line = greenbranchline; 124 | else if (linein == 'pink') 125 | line = pinkline; 126 | else if (linein == 'pinkbranch') 127 | line = pinkbranchline; 128 | else if (linein == 'orange') 129 | line = orangeline; 130 | else if (linein == 'aqua') 131 | line = aqualine; 132 | else 133 | line = 0; 134 | return line; 135 | } 136 | 137 | function stationList(value) { 138 | var linereq = lineChoose(value) 139 | return linereq 140 | } 141 | 142 | importlines() 143 | 144 | exports.get = functions.https.onRequest((req, res) => { 145 | console.log("inside station") 146 | let value = req.query.value 147 | result = stationList(value) 148 | res.send(result) 149 | }) 150 | 151 | -------------------------------------------------------------------------------- /functions/index.js: -------------------------------------------------------------------------------- 1 | const route = require('./functions/route') 2 | const stations = require('./functions/stations') 3 | 4 | exports.route = route 5 | exports.stations = stations -------------------------------------------------------------------------------- /functions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "delhimetroapi", 3 | "description": "API to get Delhi Metro Routes", 4 | "version": "0.0.1", 5 | "private": true, 6 | "license": "Apache Version 2.0", 7 | "author": "Mansehej Singh", 8 | "engines": { 9 | "node": "8" 10 | }, 11 | "scripts": { 12 | "start": "index.js", 13 | "deploy": "index.js" 14 | }, 15 | "dependencies": { 16 | "request": "2.88.0", 17 | "firebase-admin": "^8.3.0", 18 | "firebase-functions": "^3.2.0", 19 | "express": "4.17.1 " 20 | } 21 | } 22 | --------------------------------------------------------------------------------