* difference between them is the same as for the nearest one
* MappedPosition. It is used for calculating destination quad.
*/
protected MappedPosition generateCoordFromNearestOne(DirectPosition x,
List <MappedPosition> vertices) {
MappedPosition nearestOne = nearestMappedCoordinate(x, vertices);
double dstX = x.getCoordinate()[0]
+ (nearestOne.getTarget().getCoordinate()[0]
- nearestOne.getSource().getCoordinate()[0]);
double dstY = x.getCoordinate()[1]
+ (nearestOne.getTarget().getCoordinate()[1]
- nearestOne.getSource().getCoordinate()[1]);
DirectPosition dst = new DirectPosition2D(nearestOne.getTarget()
.getCoordinateReferenceSystem(),
dstX, dstY);
return new MappedPosition(x, dst);
}