... | ... | @@ -29,6 +29,8 @@ Specifically, we wanted to allow user input for these decisions: |
|
|
|
|
|
1. Ask the user to **choose a local directory**, where the programme would store the tweets.csv, tweets.kml, boston.png, and boston.kml files.
|
|
|
|
|
|
<details><summary>Code Snippet</summary>
|
|
|
|
|
|
```
|
|
|
Scanner askUser = new Scanner(System.in);
|
|
|
System.out.println("Hello! Welcome to this Google Earth Tweet and WMS Mapper.\n\nBefore we get started, could you please enter a local directory (= a folder) where a few files may be stored?\n"
|
... | ... | @@ -36,9 +38,13 @@ System.out.println("Hello! Welcome to this Google Earth Tweet and WMS Mapper.\n\ |
|
|
directory = askUser.next();
|
|
|
```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
2. Ask the user if they would like to **see additional information** on the WMS while the programme is running
|
|
|
|
|
|
<details><summary>Code Snippet</summary>
|
|
|
|
|
|
```
|
|
|
Scanner askServiceInfo = new Scanner(System.in);
|
|
|
String answer;
|
... | ... | @@ -46,8 +52,13 @@ Scanner askServiceInfo = new Scanner(System.in); |
|
|
answer = askServiceInfo.next();
|
|
|
```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
3. Ask the user if they would like to **proceed to launch** Google Earth. This step also made sure that the programme would halt again (giving the user some time to actually read the console output before Google Earth launches). If the users does not answer with some form of "yes", the programme will end with a friendly good-bye message.
|
|
|
|
|
|
<details><summary>Code Snippet</summary>
|
|
|
|
|
|
```
|
|
|
Scanner askContinue = new Scanner(System.in);
|
|
|
String answer1;
|
... | ... | @@ -55,6 +66,8 @@ Scanner askContinue = new Scanner(System.in); |
|
|
answer1 = askContinue.next();
|
|
|
```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
## Step 1: Creating a Central Class from which to Execute the Whole Programme
|
|
|
|
... | ... | @@ -112,12 +125,17 @@ Here, we created a [non-executable class "wms_ImageToKML](https://git.sbg.ac.at/ |
|
|
> - writes a kml file (containing the image) to a local wms_kml_structure.kml
|
|
|
|
|
|
When this method is called from the main class, the user will be kept updated and will see the following on the console:
|
|
|
|
|
|
<details><summary>Console Output</summary>
|
|
|
|
|
|
```
|
|
|
Turning local .png of Boston into kml format at: C:\Users\Christina\Documents\EoT\wms_kml_structure.kml...
|
|
|
Image found..
|
|
|
Image converted to kml and stored at: C:\Users\Christina\Documents\EoT\wms_kml_structure.kml
|
|
|
Step 2 completed.
|
|
|
```
|
|
|
</details>
|
|
|
|
|
|
|
|
|
## Step 3: Downloading and Converting Twitter.csv File
|
|
|
|
... | ... | @@ -129,11 +147,16 @@ Although this step was not included in the assignment instructions, we decided i |
|
|
|
|
|
The user is informed of this process when the method is called from the main class:
|
|
|
|
|
|
<details><summary>Console Output</summary>
|
|
|
|
|
|
```
|
|
|
Downloading online tweets.csv and storing locally ...
|
|
|
CSV file downloaded and stored at :C:\Users\Christina\Documents\EoT\tweets.csv
|
|
|
Step 3 completed.
|
|
|
```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
### 3.2: Converting .csv into .kml
|
|
|
|
|
|
.....
|
... | ... | @@ -149,6 +172,9 @@ In this final step, we merely used one [non-executable class "googleEarth_launch |
|
|
> - launches google earth and opens the .kml files
|
|
|
|
|
|
Once again, we are keeping the user informed. The console will show the following:
|
|
|
|
|
|
<details><summary>Console Output</summary>
|
|
|
|
|
|
```
|
|
|
Would you like to proceed to launch Google Earth now? Type Y for yes or anything else for no and hit enter.
|
|
|
y
|
... | ... | @@ -160,6 +186,7 @@ Launch complete. |
|
|
|
|
|
Step 5 completed.
|
|
|
```
|
|
|
</details>
|
|
|
|
|
|
|
|
|
### Further Information
|
... | ... | |