Update End of Term Assignment authored by Zorenböhmer Christina's avatar Zorenböhmer Christina
......@@ -28,7 +28,9 @@ Although it was not technically required by the assignment instructions, we want
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>See Code Snippet</summary>
**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> See Code Snippet</summary>
```
Scanner askUser = new Scanner(System.in);
......@@ -40,7 +42,9 @@ System.out.println("Hello! Welcome to this Google Earth Tweet and WMS Mapper.\n\
</details>
**2.** Ask the user if they would like to **see additional information** on the WMS while the programme is running. <details><summary>See Code Snippet</summary>
**2.** Ask the user if they would like to **see additional information** on the WMS while the programme is running.
<details><summary> See Code Snippet</summary>
```
Scanner askServiceInfo = new Scanner(System.in);
......@@ -52,7 +56,9 @@ Scanner askServiceInfo = new Scanner(System.in);
</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>See Code Snippet</summary>
**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> See Code Snippet</summary>
```
Scanner askContinue = new Scanner(System.in);
......@@ -64,13 +70,71 @@ Scanner askContinue = new Scanner(System.in);
</details>
## Step 1: Creating a Central Class from which to Execute the Whole Programme
## Step 1: Conceptualisation and Creating a Main, Executable Class
### 1.1: Concept
At the outset we began gathering ideas and drawing up concepts for our approach. We have visualised our concept below:
_INSERT IMAGE... NEED TO MAKE IT FIRST_
### 1.2: Create Main, Executable Class
Although this class could not be completed until we had created all other classes, we will begin with this class since it provides a neat summary of how all components for our project come together.
As stated above, we aimed to make the whole programme run smoothly without the user having to figure out which classes to execute and in which order. We hope that it may demonstrate how we applied our newly obtained knowledge about modularity, to make the whole programme run smoothly and without the user having to figure our which classes to execute and in which order. To see the main class ["GoogleEarthTweetMapper.java"](url) in the correct order.
<details><summary> See the Code for the main class here</summary>
```
package Test2;
public class execute_programme {
public static String directory = "C:\\Users\\Christina\\Documents\\EoT"; //ADAPT NAME
// public static String directory = setDirectories.directory;
public static String google_earth_filepath = "C:\\Program Files\\Google\\Google Earth Pro\\client\\googleearth.exe"; // ADAPT to where Google Earth is
public static String wms_url ="http://maps.heigit.org/osm-wms/service?service=WMS&request=GetCapabilities&version=1.1.0";
public static String wms_png = directory + "\\boston.png";
public static String wms_kml = directory + "\\wms_kml_structure.kml";
public static String twitter_url = "http://www.berndresch.com/work/twitter.csv";
public static String twitter_csv = directory + "\\tweets.csv";
public static String twitter_kml = directory + "\\tweets.kml";
public static String twitter_polygon_kml = directory + "\\tweets_polygons.kml";
public static void main(String[] args) {
// setDirectories.askUser();
As stated above, we aimed to make the whole programme run smoothly without the user having to figure out which classes to execute and in which order. We therefore applied our newly obtained knowledge about modularity and created a set of non-executable classes that will be called from the main class ["GoogleEarthTweetMapper.java"](url) in the correct order.
// run method getMap from class bostonWMS_GetMap
wms_GetMap.getMap();
System.out.println("Step 1 completed.\n");
Our concept for this approach is visualised below:
// turn wms into kml
wms_ImageToKML.wmsTOkml();
System.out.println("Step 2 completed.\n");
INSERT IMAGE... NEED TO MAKE IT FIRST
// dowload tweets CSV from web
tweets_download.downloadCSV();
System.out.println("Step 3 completed.\n");
// access local CSV tweets file and turn into kml
tweets_CSVtoKML.CSVtoKML();
System.out.println("Step 4 completed.\n");
// ask if user wants to continue
userInput2.userInput2();
System.out.println("Continued.\n");
googleEarth_launch.launchGoogleEarth();
System.out.println("Step 5 completed.\n");
}
}
```
</details>
## Step 2: Web Map Service
......
......