| | |
| | | import com.se.nsl.helper.StringHelper; |
| | | import com.se.nsl.mapper.SimuMapper; |
| | | import com.se.nsl.utils.CoordinateTransformer; |
| | | import com.se.nsl.utils.TimeFormatUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.gdal.gdal.Band; |
| | | import org.gdal.gdal.Dataset; |
| | |
| | | |
| | | ColumnRow cr = getColumnRow(tifFile, x, y); |
| | | if (cr == null) return null; |
| | | System.out.println("col:" + cr.col + " ,row:" + cr.row); |
| | | // System.out.println("col:" + cr.col + " ,row:" + cr.row); |
| | | float depth = readPixelValue(cr.dataset, cr.col, cr.row, 1); |
| | | float velocity = calcVelocity(cr.dataset, cr.col, cr.row); |
| | | SimuResult result = new SimuResult(); |
| | |
| | | } |
| | | |
| | | private String formatTime(long time) { |
| | | Instant instant = Instant.ofEpochMilli(time); |
| | | LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); |
| | | return localDateTime.format(formatter); |
| | | // Instant instant = Instant.ofEpochMilli(time); |
| | | // LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); |
| | | // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); |
| | | // return localDateTime.format(formatter); |
| | | return TimeFormatUtil.formatTime(time, "yyyyMMddHHmmss"); |
| | | } |
| | | |
| | | } |