Revision: 6605
http://sourceforge.net/p/jump-pilot/code/6605
Author: ma15569
Date: 2020-10-26 15:48:21 +0000 (Mon, 26 Oct 2020)
Log Message:
-----------
Make method getColidantes static
Modified Paths:
--------------
plug-ins/CADExtension/trunk/src/org/openjump/advancedtools/utils/EditUtils.java
Modified:
plug-ins/CADExtension/trunk/src/org/openjump/advancedtools/utils/EditUtils.java
===================================================================
---
plug-ins/CADExtension/trunk/src/org/openjump/advancedtools/utils/EditUtils.java
2020-10-26 15:47:05 UTC (rev 6604)
+++
plug-ins/CADExtension/trunk/src/org/openjump/advancedtools/utils/EditUtils.java
2020-10-26 15:48:21 UTC (rev 6605)
@@ -182,7 +182,7 @@
* @throws Exception
*/
- public Collection<Feature> getColindantes(Geometry simplyGeometryToProcess,
+ public static Collection<Feature> getColindantes(Geometry
simplyGeometryToProcess,
Layer layer) throws Exception {
Collection candidatos = layer.getFeatureCollectionWrapper().query(
simplyGeometryToProcess.getEnvelopeInternal());
@@ -544,7 +544,7 @@
.equals2D(coordinatesTarget[i])
&& startSegment.getCoordinate(1).equals2D(
coordinatesTarget[i + 1])) {
- return (Coordinate[]) ArrayUtils.add(coordinatesTarget,
+ return ArrayUtils.add(coordinatesTarget,
i + 1, cootdinateToAdd);
}
}
@@ -585,23 +585,23 @@
// si la geometr�a es cerrada devuelco una sola linestring del
// indice al final + del inicio(+1) al �ndice+1
if (lineString instanceof LinearRing
- || (lineString instanceof LineString && ((LineString)
lineString)
+ || (lineString instanceof LineString && lineString
.getStartPoint().equalsExact(
- ((LineString) lineString).getEndPoint())))
{
+ lineString.getEndPoint()))) {
Coordinate[] startPart = null;
Coordinate[] endPart = null;
- startPart = (Coordinate[]) ArrayUtils.subarray(coordinates,
+ startPart = ArrayUtils.subarray(coordinates,
startIndex, coordinates.length);
- endPart = (Coordinate[]) ArrayUtils.subarray(coordinates, 1,
+ endPart = ArrayUtils.subarray(coordinates, 1,
endIndex + 1);
lineStringsList.add(geomFac
- .createLineString((Coordinate[]) ArrayUtils.addAll(
+ .createLineString(ArrayUtils.addAll(
startPart, endPart)));
}
// si la geometria NO es cerrada devuelvo lineStringsList vac�o
return lineStringsList;
}
- Coordinate[] coordLS = (Coordinate[]) ArrayUtils.subarray(coordinates,
+ Coordinate[] coordLS = ArrayUtils.subarray(coordinates,
Math.min(startIndex, endIndex),
Math.max(startIndex, endIndex) + 1);
if (startIndex > endIndex) {
@@ -615,20 +615,20 @@
Coordinate[] startPart = null;
Coordinate[] endPart = null;
if (startIndex > endIndex) {
- startPart = (Coordinate[]) ArrayUtils.subarray(coordinates,
+ startPart = ArrayUtils.subarray(coordinates,
startIndex, coordinates.length);
- endPart = (Coordinate[]) ArrayUtils.subarray(coordinates, 1,
+ endPart = ArrayUtils.subarray(coordinates, 1,
endIndex + 1);
} else {
- startPart = (Coordinate[]) ArrayUtils.subarray(coordinates, 0,
+ startPart = ArrayUtils.subarray(coordinates, 0,
startIndex + 1);
ArrayUtils.reverse(startPart);
- endPart = (Coordinate[]) ArrayUtils.subarray(coordinates,
+ endPart = ArrayUtils.subarray(coordinates,
endIndex, coordinates.length - 1);
ArrayUtils.reverse(endPart);
}
lineStringsList.add(geomFac
- .createLineString((Coordinate[]) ArrayUtils.addAll(
+ .createLineString(ArrayUtils.addAll(
startPart, endPart)));
}
return lineStringsList;
@@ -1620,7 +1620,7 @@
// Ignore them, are the same first and end coordinates
continue;
} else if (nextIndex != -1) {
- List<LinearRing> partGeoms =
buildLinearRingsFromCoordArray((Coordinate[]) ArrayUtils
+ List<LinearRing> partGeoms =
buildLinearRingsFromCoordArray(ArrayUtils
.subarray(coords, i, nextIndex + 1));
for (LinearRing currentPart : partGeoms) {
if (currentPart.isValid() && !currentPart.isEmpty()) {
@@ -1663,7 +1663,7 @@
final ArrayList<Feature> featureCopies = new ArrayList<Feature>();
for (Iterator<Feature> i = features.iterator(); i.hasNext();) {
- Feature feature = (Feature) i.next();
+ Feature feature = i.next();
featureCopies.add(conformFeature(feature, targetFeatureSchema));
}
return featureCopies;
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel