Instantly share code, notes, and snippets.

Embed
What would you like to do?
import java.util.ArrayList;
public class ImageCollections {
private String dir = "";
private String date_begin = "";
private String date_end = "";
private String weather_cond = "";
private double nw_lat = -1;
private double nw_lon = -1;
private double se_lat = -1;
private double se_lon = -1;
ArrayList<JpgMetadata> jpgList = new ArrayList<>();
private void populateData(){
ArrayList<JpgMetadata> list = this.getJpgList();
for(int i = 0 ; i < list.size(); i++) {
//TODO : Change time once parse func is made
double[] latlon = list.get(i).getDecimalLatLon();
nw_lat = (nw_lat > latlon[0]) ? nw_lat : latlon[0];
se_lat = (se_lat < latlon[0]) ? se_lat : latlon[0];
nw_lon = (nw_lon < latlon[1]) ? nw_lon : latlon[1];
se_lon = (se_lon > latlon[1]) ? se_lon : latlon[1];
}
}
public ImageCollections(String dir, ArrayList<JpgMetadata> list){
this.jpgList = list;
this.dir = dir;
populateData();
}
public ArrayList<JpgMetadata> getJpgList() {
return jpgList;
}
public void setJpgList(ArrayList<JpgMetadata> jpgList) {
this.jpgList = jpgList;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getDate_begin() {
return date_begin;
}
public void setDate_begin(String date_begin) {
this.date_begin = date_begin;
}
public String getDate_end() {
return date_end;
}
public void setDate_end(String date_end) {
this.date_end = date_end;
}
public String getWeather_cond() {
return weather_cond;
}
public void setWeather_cond(String weather_cond) {
this.weather_cond = weather_cond;
}
public double getNw_lat() {
return nw_lat;
}
public void setNw_lat(double nw_lat) {
this.nw_lat = nw_lat;
}
public double getNw_lon() {
return nw_lon;
}
public void setNw_lon(double nw_lon) {
this.nw_lon = nw_lon;
}
public double getSe_lat() {
return se_lat;
}
public void setSe_lat(double se_lat) {
this.se_lat = se_lat;
}
public double getSe_lon() {
return se_lon;
}
public void setSe_lon(double se_lon) {
this.se_lon = se_lon;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment