| | |
| | | @Value("${sys.ver}") |
| | | String ver; |
| | | |
| | | @Value("${sys.path.data}") |
| | | String dataPath; |
| | | @Value("${sys.path.out}") |
| | | String outPath; |
| | | |
| | | /** |
| | | * 获取元数据信息 |
| | | */ |
| | | public byte[] getLayerJson(String serviceName) { |
| | | try { |
| | | String filePath = dataPath + File.separator + serviceName + File.separator + "layer.json"; |
| | | String filePath = outPath + File.separator + serviceName + File.separator + "layer.json"; |
| | | |
| | | File dat = new File(filePath); |
| | | if (!dat.exists()) { |
| | |
| | | * 获取地形高度图 |
| | | */ |
| | | public String getTerraMap(String serviceName, Integer width, Integer height) { |
| | | return dataPath + File.separator + serviceName + File.separator + "terrain" + File.separator + width + "_" + height + ".png"; |
| | | return outPath + File.separator + serviceName + File.separator + "terrain" + File.separator + width + "_" + height + ".png"; |
| | | } |
| | | |
| | | /** |
| | | * 获取水面高度图 |
| | | */ |
| | | public String getWaterMap(String serviceName, Integer width, Integer height, Long timestamp) { |
| | | return dataPath + File.separator + serviceName + File.separator + "waters" + File.separator + timestamp + File.separator + width + "_" + height + ".png"; |
| | | return outPath + File.separator + serviceName + File.separator + "waters" + File.separator + timestamp + File.separator + width + "_" + height + ".png"; |
| | | } |
| | | |
| | | /** |
| | | * 获取水流向流速图 |
| | | */ |
| | | public String getFlowMap(String serviceName, Integer width, Integer height, Long timestamp) { |
| | | return dataPath + File.separator + serviceName + File.separator + "flows" + File.separator + timestamp + File.separator + width + "_" + height + ".png"; |
| | | return outPath + File.separator + serviceName + File.separator + "flows" + File.separator + timestamp + File.separator + width + "_" + height + ".png"; |
| | | } |
| | | |
| | | /** |
| | | * 获取图层 |
| | | * 获取图层 * |
| | | */ |
| | | public Layer getLayer(String serviceName) { |
| | | Layer layer = new Layer(); |