Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.java @ 5170:c1b60f8c3390
Made river mapfile generator more tolerant.
* Ignores missing river axes.
* Ignores invalid river axes.
* Ignores invalid geometries.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 04 Mar 2013 17:11:31 +0100 |
parents | ed237d6e8e27 |
children | 14d19313268a |
comparison
equal
deleted
inserted
replaced
5169:db1a000a21a9 | 5170:c1b60f8c3390 |
---|---|
82 return list.get(0); | 82 return list.get(0); |
83 } | 83 } |
84 | 84 |
85 | 85 |
86 protected void doRiverAxisInfo(River river) { | 86 protected void doRiverAxisInfo(River river) { |
87 List<RiverAxis> axis = RiverAxis.getRiverAxis(river.getName()); | 87 try { |
88 if (axis != null && axis.size() > 0) { | 88 List<RiverAxis> axis = RiverAxis.getRiverAxis(river.getName()); |
89 logger.debug("TODO: Compute length and boundary."); | 89 if (axis != null && axis.size() > 0) { |
90 logger.debug("TODO: Compute length and boundary."); | |
91 } | |
92 else { | |
93 logger.warn("River has no RiverAxis."); | |
94 } | |
90 } | 95 } |
91 else { | 96 catch(RuntimeException e) { |
92 logger.warn("River has no RiverAxis."); | 97 return; |
93 } | 98 } |
99 | |
94 } | 100 } |
95 | 101 |
96 | 102 |
97 protected void doCrossSectionTracksInfo(River river) { | 103 protected void doCrossSectionTracksInfo(River river) { |
98 Query query = session.createQuery( | 104 Query query = session.createQuery( |