-1

I am not a programmer so maybe my question seem very fundamental. I have to run the the code in the link below to get an output file: https://github.com/matsim-org/pt2matsim/blob/master/src/main/java/org/matsim/pt2matsim/run/Gtfs2TransitSchedule.java

This code gets an input (a folder containing some text files related to open street map) and also in the code I have to specify a coordinate system (in my case is EPSG:3857) and I think also I have to specify a path fot the output file. Unfotunately I don't know how I should specify the input file and also how I should edit my desired coordinate system. Also I have to mention these are written as args[0], args[1], args[2] and args[4] in the code.

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128
  • Does this answer your question? [How do I parse command line arguments in Java?](https://stackoverflow.com/questions/367706/how-do-i-parse-command-line-arguments-in-java) – knittl Sep 24 '22 at 21:34
  • Thanks for your response, but as I don't have programming knowledge so a straight answer accordnig to the current code would be more helpful for me. – Aysun Patkavak Sep 24 '22 at 21:40
  • But the accepted answer contains "Usage from the command line: …" – is that not what you are asking? – knittl Sep 24 '22 at 21:42
  • let me ask this way, in my code line(line 103,102), is the place that i should write the path to my input file? if yes how? – Aysun Patkavak Sep 24 '22 at 21:46
  • // load gtfs files GtfsFeed gtfsFeed = new GtfsFeedImpl(gtfsFolder); – Aysun Patkavak Sep 24 '22 at 21:47
  • No, you should call your program on the commandline with the arguments provided. `java yourprogram arg1 arg2 arg3 …` – knittl Sep 25 '22 at 06:38
  • thanks, I went to edit configuration but now I don't know in which part should I import these arguments and also args[0] is an import folder(the whole folder is input data consists of some text files) and also other args are some additional paramterts that affect the output – Aysun Patkavak Sep 25 '22 at 18:16

1 Answers1

0

in IntelliJ, go to Run, edit configuration, in Program arguments you have to write the argumnet values or paths and seperate them by space for example if my first argument is a zip folder in Drive C and my second argument is a date then I should write like below: C://Folder//A.zip 2022.09.27