I'm doing a project for programming but I'm not able to do the extreme command or command county, I leave here the project page .
I created 4 auxiliary functions similar to this one, in which the only difference is in latitudes, longitudes and if it is north, south, east or west. When I call the auxiliary functions in the command does not work but I do not know how else I can do
int parcel_north(Cartography cartography, int n) {
int i, maior_lat = 0;
for (i = 0; i < n; i++) {
if (cartography[i].main.bounding_box.topLeft.lat > maior_lat) {
maior_lat = i;
i++;
}
}
return maior_lat;
}
int parcel_east(Cartography cartography, int n) {
int i, maior_lon = 0;
for (i = 0; i < n; i++) {
if (cartography[i].main.bounding_box.topLeft.lon > maior_lon) {
maior_lon = i;
i++;
}
}
return maior_lon;
}
int parcel_south(Cartography cartography, int n) {
int i, menor_lat = 0;
for (i = 0; i < n; i++) {
if (cartography[i].main.bounding_box.bottomRight.lat < menor_lat) {
menor_lat = i;
i++;
}
return menor_lat;
}
int parcel_west(Cartography cartography, int n) {
int i, menor_lon = 0;
for (i = 0; i < n; i++) {
if (cartography[i].main.bounding_box.topLeft.lon < menor_lon) {
menor_lat = i;
i++;
}
}
return menor_lon;
}