another check on parsing lat/long
This commit is contained in:
parent
363bc89550
commit
16c1ecef11
|
@ -157,8 +157,9 @@ public class ConvertToServiceModel {
|
||||||
List<String> latList = mapFields.get("Latitudine Centroide");
|
List<String> latList = mapFields.get("Latitudine Centroide");
|
||||||
if(latList!=null && latList.size()>0){
|
if(latList!=null && latList.size()>0){
|
||||||
try {
|
try {
|
||||||
if(!latList.get(0).isEmpty()) {
|
String theLat = latList.get(0);
|
||||||
Double centroidLat = Double.parseDouble(latList.get(0));
|
if(theLat!=null && !theLat.isEmpty()) {
|
||||||
|
Double centroidLat = Double.parseDouble(theLat);
|
||||||
concessione.setCentroidLat(centroidLat);
|
concessione.setCentroidLat(centroidLat);
|
||||||
}
|
}
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -169,8 +170,9 @@ public class ConvertToServiceModel {
|
||||||
List<String> longList = mapFields.get("Longitudine Centroide");
|
List<String> longList = mapFields.get("Longitudine Centroide");
|
||||||
if(longList!=null && longList.size()>0){
|
if(longList!=null && longList.size()>0){
|
||||||
try {
|
try {
|
||||||
if(!longList.get(0).isEmpty()) {
|
String theLong = longList.get(0);
|
||||||
Double centroidLong = Double.parseDouble(longList.get(0));
|
if(theLong!=null && !theLong.isEmpty()) {
|
||||||
|
Double centroidLong = Double.parseDouble(theLong);
|
||||||
concessione.setCentroidLong(centroidLong);
|
concessione.setCentroidLong(centroidLong);
|
||||||
}
|
}
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue