class MapPolylineGridSet extends MapElementGridSet<P> implements GISPolylineSet<P> {

	@Override
	public boolean add(P polyline, double precision,
			OutputParameter<P> firstNeighbour,
			OutputParameter<P> secondNeighbour) {
		if (add(polyline)) {
			Point2d point;

			point = polyline.getPointAt(0);
			if (point != null) {
				firstNeighbour.set(getNearestEnd(polyline, point, precision));
			}

			point = polyline.getPointAt(polyline.getPointCount() - 1);
			if (point != null) {
				secondNeighbour.set(getNearestEnd(polyline, point, precision));
			}

			return true;
		}

		return false;
	}

	public  MapPolylineGridSet(int nRows, int nColumns, double boundsX, double boundsY, double boundsWidth, double boundsHeight);
	public  MapPolylineGridSet(int nRows, int nColumns, Rectangle2d bounds);

}